Skip to content

Remap Physical Back Button As Guide Button#99

Merged
ClassicOldSong merged 3 commits intoClassicOldSong:moonlight-noirfrom
pdien:back_as_guide
Jan 21, 2025
Merged

Remap Physical Back Button As Guide Button#99
ClassicOldSong merged 3 commits intoClassicOldSong:moonlight-noirfrom
pdien:back_as_guide

Conversation

@pdien
Copy link
Copy Markdown

@pdien pdien commented Jan 20, 2025

Summary

Devices like the Retroid Pocket 5 have a physical back button that's mapped as Select. I find it is more useful as a guide button.

New Feature

  • Added a new preference option to remap physical back button to guide.

@ClassicOldSong
Copy link
Copy Markdown
Owner

Cool, but does it conflict with back as meta option? Or it needs some more detailed clarification between these two options.

@pdien
Copy link
Copy Markdown
Author

pdien commented Jan 20, 2025

I tested the meta option on the RP5 and it doesn't respond to that. Can't say for other devices. Having both options enabled shows no issues and forwards the guide button in my testing. I checked the code for backAsMeta and found it was under the keyboard handler so I would assume that's why it didn't work when I tested it.

@pdien
Copy link
Copy Markdown
Author

pdien commented Jan 20, 2025

Doing some more testing I can confirm the meta option only responds to keyboard activity, e.g. Backspace which is KEYCODE_BACK, I believe. Is that expected behavior? Having both options enabled doesn't interfere with each other.

@ClassicOldSong
Copy link
Copy Markdown
Owner

The back as meta is not backspace on the keyboard, it's physical back button triggering Android's back action. I'll test it further after I get up. Anyway thanks for the contribution!

@pdien
Copy link
Copy Markdown
Author

pdien commented Jan 21, 2025

Ah I see. I got things mixed up because I was using scrcpy to use my PCs kb+m on the android device for testing. The shortcut is Alt+Backspace which sends the physical back button over keyboard. And of course, thanks for all your hard work!

@ClassicOldSong ClassicOldSong merged commit db58f58 into ClassicOldSong:moonlight-noir Jan 21, 2025
@pdien pdien deleted the back_as_guide branch January 21, 2025 16:55
@Avokkrii
Copy link
Copy Markdown

I've tested this feature on a similar device, Ayn Odin 2 Portal, but it didn't seem to work: when the Back button as Guide option is activated, pressing the back button just doesn't do anything on my end.

@pdien
Copy link
Copy Markdown
Author

pdien commented May 20, 2025

Does it not do anything in Steam or in general, e.g. Windows Control Panel "Setup USB Game Controllers"?

@Avokkrii
Copy link
Copy Markdown

Does it not do anything in Steam or in general, e.g. Windows Control Panel "Setup USB Game Controllers"?

In Steam's Big Picture mode specifically, where it's supposed to open either one of the two sidebars, or the overlay when in-game. I'm running a SteamOS (Linux) based machine, if that makes any difference. The guide button on an actual Xbox controller works as intended, if that's useful information.

@Avokkrii
Copy link
Copy Markdown

Forcing Artemis to use the device's motion sensor changes the perceived controller type to a Playstation one, and in that mode the physical back button does work as a guide button, as intended. However, using the default configuration, with the controller set as an Xbox one, I can't get it to work. Unsure if those two controllers and their drivers have different commands for the guide button and only the Playstation one was set?

@pdien
Copy link
Copy Markdown
Author

pdien commented May 21, 2025

Oh that's interesting. Are you able to confirm if the feature, as an Xbox controller, works for you in a Windows environment? Also, which SteamOS-based distro are you using?

@Avokkrii
Copy link
Copy Markdown

I'm using the official SteamOS by Valve, via the Steam Deck Recovery Image.

I'll test it on both a Fedora laptop (using Sunshine) and Windows desktop (using Apollo) tomorrow and update with results.

@pdien
Copy link
Copy Markdown
Author

pdien commented May 21, 2025

I just installed Bazzite on a VM to test and got the same results as you. Also tried it with Sunshine on Windows to rule out Apollo vs Sunshine and it works on there. Issue seems to be isolated to Linux. I'm testing using a Retroid Pocket Flip 2.

@pdien pdien mentioned this pull request May 21, 2025
@pdien
Copy link
Copy Markdown
Author

pdien commented May 21, 2025

@Avokkrii I found the issue and made a temporary release on my fork until it can get merged into the next release. It's the debug build so it's named Diana when installed so as to not interfere with the regular release. Give it a go and let me know if it works for you.

@timbueno
Copy link
Copy Markdown

I have not tried the debug build Diana but I want to add that on the Odin 2 Portal, the back button does not work as a guide button on Windows.

@pdien
Copy link
Copy Markdown
Author

pdien commented May 21, 2025

The "Back button as Guide" is an option under Input in the settings menu. The latest changes are now in the new release from this morning.

@timbueno
Copy link
Copy Markdown

This is really great! I guess I misunderstood. I thought this was related to Issue #142.

This does make the button more useful to me but I’ll continue monitoring progress on Issue #142.

@Avokkrii
Copy link
Copy Markdown

Avokkrii commented May 21, 2025

@Avokkrii I found the issue and made a temporary release on my fork until it can get merged into the next release. It's the debug build so it's named Diana when installed so as to not interfere with the regular release. Give it a go and let me know if it works for you.

I went to test out Diana, but something must've gone wrong with creating the apk release? At least on my end, it's an 8kb file that when installed I'm not unable to open it. Am I supposed to install it and then run the regular Apollo app and it works as a sort of patch? Images for reference.

Screenshot_20250521-182545
Screenshot_20250521-182519
Screenshot_20250521-182526

In any case, I see the fix has already been merged, so I guess I'll know when the next version releases anyways.

edit: apparently that release is already out? I'll test it out now and report back.

@pdien
Copy link
Copy Markdown
Author

pdien commented May 21, 2025

You don't need to use my release anymore since my changes were merged and new release was made this morning.
You can just use the latest Artemis release.

@Avokkrii
Copy link
Copy Markdown

You don't need to use my release anymore since my changes were merged and new release was made this morning. You can just use the latest Artemis release.

Yup, only noticed there was already a new release after commenting.

It now works great on my SteamOS machine, thanks! [it's still a major pain to get working when in-game, but that's a quirk of SteamOS' gamemode that is unrelated to this feature, and exists even when using an actual Xbox controller]

Let me know if you still want me to test it out on a Windows and a Fedora machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants