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

    Super/meta keys?

    Scheduled Pinned Locked Moved Help and Support
    keyboardsupermetaamigalr-puae
    10 Posts 2 Posters 905 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.
    • R
      rhester72
      last edited by

      In lr-puae2021, with Game Focus on, I'm trying to work out how to get the emulator (which uses lsuper/meta as the closed Amiga key and rsuper/meta as the open Amiga key) to recognize those keystrokes. I know that PgUp is mapped to closed Amiga and PgDown is mapped to open Amiga, but I'd really like to get the 'proper' keyboard keys working if possible.

      Any thoughts on where this needs to be configured (or how I can even confirm the raw keyboard codes coming from the keyboard that I believe should be the correct 'super' keys are as they should be)?

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @rhester72
        last edited by

        @rhester72 said in Super/meta keys?:

        Any thoughts on where this needs to be configured (or how I can even confirm the raw keyboard codes coming from the keyboard that I believe should be the correct 'super' keys are as they should be)?

        I think you can use showkey on the command line to print the key code(Esc + the key you want, see the man page) and dumpkeys to check how the code is mapped to the keyboard layout.

        Looking at RA's keyboard mapping, the meta keys may not be mapped though - https://github.com/libretro/RetroArch/blob/7a2c6e9e521f60a79a88974f90a9840a46f8c6bc/input/input_keymaps.c#L1260-L1263

        R 1 Reply Last reply Reply Quote 0
        • R
          rhester72 @mitu
          last edited by

          @mitu This is very helpful, thank you!

          I think in my case, the supers may actually be what I'm after. I see the following in the core:

          RETROK_LSUPER
          Keyboard Right Super
          RETROK_LSUPER
          Keyboard Right Super

          but how do I determine what actual keys those are (or even better, define them)?

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by mitu

            You can use showkeys to check the code for the key you're after or evtest to get the name of the key. I don't know how you can override them or re-configure them.
            FWIW, I can press use the left/right Amiga buttons with the left/right Meta keys on my keyboard, though I don't think these are the buttons you're looking for ?

            atk.png

            1 Reply Last reply Reply Quote 0
            • R
              rhester72
              last edited by rhester72

              Thanks to evtest, I now know the Pi400 has a a left meta key but not a right one! :P

              Two last questions:

              • What Amiga app is pictured in your screenshot? NEVER MIND, found it =)

              For anyone else who cares, it's the Amiga Test Kit:

              https://github.com/keirf/Amiga-Stuff/releases

              • Is anyone aware of a means to map at a low level a specific keyboard key to respond as another (i.e. make right Ctrl report as right Meta)?

              EDIT:

              NOT a fan of source hacks, but this will allow RCTRL to function as RAMI if it is not also defined as a hotkey in core options:

              sed -i 's/^\( \)AK_CTRL\(,. 305 \)/\1AK_RAMI\2/g' libretro/libretro-mapper.h

              I can't actually think of a good reason why you wouldn't want right Control as another stand-in for right Amiga...perhaps this is worth putting up as a legitimate enhancement request in lr-puae[2021]. Thoughts welcome.

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @rhester72
                last edited by

                @rhester72 said in Super/meta keys?:

                Is anyone aware of a means to map at a low level a specific keyboard key to respond as another (i.e. make right Ctrl report as right Meta)?

                For the console, you can create a custom keympap and load it - see https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration. Under X11, I think setxkbmap can do the same.

                ...
                I can't actually think of a good reason why you wouldn't want right Control as another stand-in for right Amiga...perhaps this is worth putting up as a legitimate enhancement request in lr-puae[2021]. Thoughts welcome.

                I think that is reasonable, sonninos (the core maintainer) is very responsive and you can ask them to add Ctrl (L/R) as substitutes for the Meta keys.

                R 1 Reply Last reply Reply Quote 0
                • R
                  rhester72 @mitu
                  last edited by

                  @mitu I really thought I had it.

                  Setting "ctrl:swap_rwin_rctl" in XKBOPTIONS in /etc/default/keyboard DOES change behavior on the console...but not in Retroarch.

                  I'll open an enhancement request and see where it goes. =)

                  Thanks SO much for the pointers!

                  R 1 Reply Last reply Reply Quote 0
                  • R
                    rhester72 @rhester72
                    last edited by

                    Closing the loop:

                    https://github.com/libretro/libretro-uae/issues/583

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @rhester72
                      last edited by

                      @rhester72 said in Super/meta keys?:

                      https://github.com/libretro/libretro-uae/issues/583

                      Thanks for opening it up, hopefully a solution can come out of this.

                      R 1 Reply Last reply Reply Quote 0
                      • R
                        rhester72 @mitu
                        last edited by

                        @mitu Merged! =)

                        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.