You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hotkeys don't work on my Linux laptop. Nothing happens when I press one.
I did a little investigation into why. The relevant file is src/osal/osal_keys_linux.c in the osal module.
There are two problems:
osal can't find my keyboard. How this works is it looks for files of the form /dev/input/by-id/*kbd*.
/dev/input/by-id is typically populated by USB devices. I'm using a laptop, not a USB keyboard, so my keyboard isn't listed there.
Workaround: Plug in a USB keyboard. Alternatively, you can use the environment variable GLIDEN64_KEYBOARD to directly set the path to the device you want to use (eg. /dev/input/event3 for me).
osal cannot open the device file after it finds it. fopen fails with a permission error.
I believe this is a security hardening measure against keyloggers. I think programs are generally expected to get keypresses from X/Wayland instead of directly reading device files. See this forum thread.
Workaround: I was able to fix this by adding myself to the input group (usermod -aG input scurest) and rebooting. See this. (Sudo will also likely work.)
Not sure how feasible these are to fix, especially (2), but hopefully this can at least be useful to someone else who has the same problem.
The text was updated successfully, but these errors were encountered:
ideally I'd make a mupen64plus API which allows plugins to receive the state of the keyboard from the front-end, sadly though this was the best I could do at the time due to not coming up with a good API design, maybe this'll change in the future though!
I'm glad you were able to find the workarounds though
OS: Arch Linux
Frontend: RMG
Hotkeys don't work on my Linux laptop. Nothing happens when I press one.
I did a little investigation into why. The relevant file is src/osal/osal_keys_linux.c in the osal module.
There are two problems:
osal can't find my keyboard. How this works is it looks for files of the form
/dev/input/by-id/*kbd*
./dev/input/by-id
is typically populated by USB devices. I'm using a laptop, not a USB keyboard, so my keyboard isn't listed there.Workaround: Plug in a USB keyboard. Alternatively, you can use the environment variable
GLIDEN64_KEYBOARD
to directly set the path to the device you want to use (eg./dev/input/event3
for me).osal cannot open the device file after it finds it.
fopen
fails with a permission error.I believe this is a security hardening measure against keyloggers. I think programs are generally expected to get keypresses from X/Wayland instead of directly reading device files. See this forum thread.
Workaround: I was able to fix this by adding myself to the
input
group (usermod -aG input scurest
) and rebooting. See this. (Sudo will also likely work.)Not sure how feasible these are to fix, especially (2), but hopefully this can at least be useful to someone else who has the same problem.
The text was updated successfully, but these errors were encountered: