Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fixed key layout file for Steam Deck controller #19

Merged
merged 2 commits into from
Feb 4, 2024

Conversation

DerpyChap
Copy link
Contributor

The current key layout file used for the Steam Deck's virtual controller incorrectly binds the triggers to the right stick (with the right stick itself seemingly bound to nothing). This can be verified by using Gamepad Tester by selva sundar. I've also noticed this layout binding issue in games such as Minecraft, Riptide GP2 and Asphalt 9: Legends.

I have been able to fix this by adding a custom Vendor_28de_Product_11ff.kl key layout file to /var/lib/waydroid/overlay/system/usr/keylayout/, which my PR adds as an additional step in the shell script. I'm not sure if there are any other Product IDs that could be associated with the virtual controller, so some additional testing on other Steam Decks may be required.

The file itself is based on the Steam Controller key layout from the AOSP, with the following change to make the triggers work:

# Triggers.
-axis 0x15 LTRIGGER
-axis 0x14 RTRIGGER
+axis 0x02 LTRIGGER
+axis 0x05 RTRIGGER

I've also removed some unused inputs such as the rear buttons, since Steam's virtual controller does not directly expose them.

This issue did not affect the Game Controller Tester app by POW Games UK, which presumably uses a different method of reading controller inputs and will still work fine as a result.

@ryanrudolfoba
Copy link
Owner

ryanrudolfoba commented Feb 3, 2024

wow this is awesome! Gonna test and provide feedback! We we're talking about the controller issue with another steam deck member (author of non stl) and your solution is very timely!

@ryanrudolfoba ryanrudolfoba merged commit 2cb72da into ryanrudolfoba:main Feb 4, 2024
@ryanrudolfoba
Copy link
Owner

tested and this works good thank you so much!
i'll have to edit the script a bit and place the kl file under "extras" directory, together with a custom hosts file that blocks ads.

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.

2 participants