Skip to content

Add fixed key layout file for Steam Deck controller#19

Merged
ryanrudolfoba merged 2 commits intoryanrudolfoba:mainfrom
DerpyChap:main
Feb 4, 2024
Merged

Add fixed key layout file for Steam Deck controller#19
ryanrudolfoba merged 2 commits intoryanrudolfoba:mainfrom
DerpyChap:main

Conversation

@DerpyChap
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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