RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Is there a way to map <Enter> to a non-zero button? (joy2key)

    Scheduled Pinned Locked Moved Help and Support
    controller mapjoy2keyarcade cabinet
    4 Posts 3 Posters 2.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • meleuM
      meleu
      last edited by meleu

      Hi,

      I have an arcade cabinet with this controller:
      0_1481793077953_neogeocontroller.jpg

      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)

      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      dankcushionsD 1 Reply Last reply Reply Quote 0
      • dankcushionsD
        dankcushions Global Moderator @meleu
        last edited by

        IMO joy2key should consider ANY joystick button to be enter/ok, rather than one specific, but maybe i'm missing something :)

        meleuM 1 Reply Last reply Reply Quote 0
        • meleuM
          meleu @dankcushions
          last edited by

          @dankcushions yeah. You're missing that we need the <tab> in some situations (e.g. dialog --editbox). :-)

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          BuZzB 1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators @meleu
            last edited by

            @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.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            1 Reply Last reply Reply Quote 1
            • First post
              Last post

            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.