Is there a way to map <Enter> to a non-zero button? (joy2key)
-
Hi,
I have an arcade cabinet with this controller:
I configured it with an usual mapping:
[ Y ] [ X ] [ L ] [ L2 ] [ B ] [ A ] [ R ] [ R2 ]
The buttons have the following numbers:
[ 0 ] [ 1 ] [ 2 ] [ 6 ] [ 3 ] [ 4 ] [ 5 ] [ 7 ]
With this config the button 4 is the "OK" button in emulationstation and in RetroArch. In order to keep the same "feeling" I would like to use the button 4 for <Enter> on the console dialogs too (runcommand menu, RetroPie-Setup, etc.).
Is there a way to achieve it?
Or a more targeted question to what I believe is the possible solution:
Is there some line of code in joy2key where I can hardcode the button 4 to receive the config that the button 0 receives? (I know that joy2key is overwritten after an updating, but I won't update this build so frequently) -
IMO joy2key should consider ANY joystick button to be enter/ok, rather than one specific, but maybe i'm missing something :)
-
@dankcushions yeah. You're missing that we need the <tab> in some situations (e.g.
dialog --editbox
). :-) -
@meleu you can adjust the codes that get sent - means customising the scripts though.
eg. line 116 of
runcommand.sh
from
"$ROOTDIR/supplementary/runcommand/joy2key.py" "$JOY2KEY_DEV" kcub1 kcuf1 kcuu1 kcud1 0x0a 0x09 &
to
"$ROOTDIR/supplementary/runcommand/joy2key.py" "$JOY2KEY_DEV" kcub1 kcuf1 kcuu1 kcud1 0x0a 0x09 0x0a 0x0a 0x0a &
would assign
0x0a
(enter) to buttons 2, 3 and 4 in addition to the existing mapping.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.