Repository navigation
Let controller buttons act as Android's Home, Back and Screenshot - #31
Open
thisishuey wants to merge 1 commit into
Open
thisishuey wants to merge 1 commit into
thisishuey wants to merge 1 commit into
Conversation
A Switch 2 controller's Home, Capture and C reach Android only as gamepad keys that no system action answers to, so going home or back from a game, or taking a screenshot, meant reaching for the device itself. On a Retroid Pocket Nova, C on player 1 even arrived as B. Settings now has an Android buttons section with three rows: Home, Back and Screenshot. Each takes one of Home, Capture, C, GL, GR, − or +, and all start as None. A choice applies to every player while the Virtual Gamepad is on, and the chosen button no longer reaches games. Home and Back travel on the virtual gamepad. It gains a trailing Consumer Control collection, and ReportMapper moves a bound button out of the gamepad bits into AC Home or AC Back, which Android reads as HOME and BACK. Screenshot runs `input keyevent 120` (SYSRQ) through the privileged shell, once per press: a Print Screen usage on the pad took no screenshot on the Nova, while the shell command did. Only buttons SidewaysMapper never moves are offered, so a button's id is the same in the player's input and in the report. Emulator configs keep their bindings to a bound button, so setting it back to None needs no new Set up. Android always handles Home itself, so a bound Home leaves the game. Tested on a Retroid Pocket Nova (Android 13) with NSO GameCube controllers: Home, Back and Screenshot each work, and holding the Screenshot button takes one screenshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Switch 2 controller's Home, Capture and C reach Android only as gamepad keys that no system action answers to, so going home or back from a game, or taking a screenshot, meant reaching for the device itself. On a Retroid Pocket Nova, C on player 1 even arrived as B.
Settings now has an Android buttons section with three rows: Home, Back and Screenshot. Each takes one of Home, Capture, C, GL, GR, − or +, and all start as None. A choice applies to every player while the Virtual Gamepad is on, and the chosen button no longer reaches games.
Home and Back travel on the virtual gamepad. It gains a trailing Consumer Control collection, and ReportMapper moves a bound button out of the gamepad bits into AC Home or AC Back, which Android reads as HOME and BACK. Screenshot runs
input keyevent 120(SYSRQ) through the privileged shell, once per press: a Print Screen usage on the pad took no screenshot on the Nova, while the shell command did.Only buttons SidewaysMapper never moves are offered, so a button's id is the same in the player's input and in the report. Emulator configs keep their bindings to a bound button, so setting it back to None needs no new Set up. Android always handles Home itself, so a bound Home leaves the game.
Tested on a Retroid Pocket Nova (Android 13) with NSO GameCube controllers: Home, Back and Screenshot each work, and holding the Screenshot button takes one screenshot.