Skip to content

Commit

Permalink
add ShanWan gamepad for joymap.map
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaczer committed Oct 13, 2023
1 parent 96ee5d9 commit 1f903c9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions board/miyoo/main/apps/joymap/input_info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
input_info /dev/input/event1 >> /mnt/input.log
22 changes: 22 additions & 0 deletions board/miyoo/main/joymap.map
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,25 @@ button vendor=0x045e product=0x2ea src=26 target=kbd button="esc"
button vendor=0x045e product=0x2ea src=27 target=kbd button="enter"
axis vendor=0x045e product=0x2ea src=16 target=kbd plus="right" minus="left" flags=trinary
axis vendor=0x045e product=0x2ea src=17 target=kbd plus="down" minus="up" flags=trinary

#Generic USB 2.4GHz gamepad (device "ShanWan PC/PS3/Android")
##mapping for 13 physical buttons and 6 axis (D-PAD + 2 analog sticks)
button vendor=0x2563 product=0x0575 src=16 target=kbd button="leftshift" #Δ
button vendor=0x2563 product=0x0575 src=17 target=kbd button="leftalt" #O
button vendor=0x2563 product=0x0575 src=18 target=kbd button="leftctrl" #X
button vendor=0x2563 product=0x0575 src=19 target=kbd button="space" #█
button vendor=0x2563 product=0x0575 src=20 target=kbd button="tab" #L1
button vendor=0x2563 product=0x0575 src=21 target=kbd button="backspace" #R1
button vendor=0x2563 product=0x0575 src=22 target=kbd button="pgup" #L2
button vendor=0x2563 product=0x0575 src=23 target=kbd button="pgdn" #R2
button vendor=0x2563 product=0x0575 src=24 target=kbd button="esc" #SELECT
button vendor=0x2563 product=0x0575 src=25 target=kbd button="enter" #START
button vendor=0x2563 product=0x0575 src=26 target=kbd button="rightalt" #L3
button vendor=0x2563 product=0x0575 src=27 target=kbd button="rightshift" #R3
button vendor=0x2563 product=0x0575 src=28 target=kbd button="rightctrl" #ANALOG switch digital/analog button
axis vendor=0x2563 product=0x0575 src=0 target=kbd minus="left" plus="right" min=0 max=255 deadzone=129 flags=trinary #D-PAD or RStick ANALOG
axis vendor=0x2563 product=0x0575 src=1 target=kbd minus="up" plus="down" min=0 max=255 deadzone=129 flags=trinary #D-PAD or RStick ANALOG
axis vendor=0x2563 product=0x0575 src=2 target=kbd minus="left" plus="right" min=0 max=255 deadzone=129 flags=trinary #LStick
axis vendor=0x2563 product=0x0575 src=5 target=kbd minus="up" plus="down" min=0 max=255 deadzone=129 flags=trinary #LStick
axis vendor=0x2563 product=0x0575 src=16 target=kbd minus="left" plus="right" flags=trinary #D-PAD ANALOG
axis vendor=0x2563 product=0x0575 src=17 target=kbd minus="up" plus="down" flags=trinary #D-PAD ANALOG

0 comments on commit 1f903c9

Please sign in to comment.