1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00

hwdb: add scancodes for AYANEO devices (#33378)

AYANEO has multiple models that all use the same AT Translated Set
2 Keyboard device with 3-4 buttons available. Starting with the
AYANEO 2 there was a change to the IMU programming they were using
that caused the scancodes to no longer present the correct values
in Linux. This change adds a blanket scancode mapping to present
the correct keycodes as designed by the OEM.

In some cases a kernel bug will cause the AT Translated Set 2
Keyboard to present as an AT Raw Set 2 keyboard. I have also
adjusted the scancodes for this scenario as well so they are
in line with expected behavior. Currently only the Kun is still
experiencing this bug.

Example userspace tool refs:
https://github.com/ShadowBlip/InputPlumber/blob/main/rootfs/usr/lib/udev/hwdb.d/59-inputplumber.hwdb
https://github.com/ShadowBlip/HandyGCCS/blob/main/usr/lib/udev/hwdb.d/59-handygccs-ayaneo.hwdb
https://github.com/hhd-dev/hhd/tree/master/usr/lib/udev/hwdb.d
This commit is contained in:
Derek J. Clark 2024-06-17 17:19:30 -07:00 committed by GitHub
parent 2dda7bd241
commit 25dcd9a348
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -290,10 +290,22 @@ evdev:name:gpio-keys:phys:gpio-keys/input0:ev:100003:dmi:*:svnASUSTeKCOMPUTERINC
# All four of these buttons generate a multi-scancode sequence
# consisting of Left_Meta, Right_Ctrl and another scancode.
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAYANEO:pnKUN:pvr*
KEYBOARD_KEY_18=f13 # LC (next to the left shoulder button)
KEYBOARD_KEY_20=f14 # RC (next to the right shoulder button)
KEYBOARD_KEY_30=f15 # Start (upper-right corner of screen)
KEYBOARD_KEY_28=f16 # Ayaneo (lower-right corner of screen)
KEYBOARD_KEY_18=f15 # LC (next to the left shoulder button)
KEYBOARD_KEY_20=f16 # RC (next to the right shoulder button)
KEYBOARD_KEY_28=f17 # Ayaneo (lower-right corner of screen)
KEYBOARD_KEY_30=f18 # Touchpad Mode (top-right corner of screen)
# Most AYANEO devices expose an AT Translated Set 2 Keyboard
# for either three or four additional buttons not available
# on the Xbox360 controller. These buttons all generate a
# multi-scancode sequence. The specific preceding codes
# depend on the model, but the final scancode is always the
# same.
evdev:name:AT Translated Set 2 keyboard:dmi:*:svnAYANEO:*
KEYBOARD_KEY_66=f15 # LC (All models)
KEYBOARD_KEY_67=f16 # RC (All models)
KEYBOARD_KEY_68=f17 # Ayaneo (All models)
KEYBOARD_KEY_69=f18 # Touchpad Mode (Kun only)
###########################################################
# BenQ