Super/meta keys?
-
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)?
-
@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) anddumpkeys
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 -
@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 Superbut how do I determine what actual keys those are (or even better, define them)?
-
You can use
showkeys
to check the code for the key you're after orevtest
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 ? -
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.
-
@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.
-
@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!
-
Closing the loop:
-
@rhester72 said in Super/meta keys?:
Thanks for opening it up, hopefully a solution can come out of this.
-
@mitu Merged! =)
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.