Run-native under Linux: lots of buttons don’t work, and some undocumented ones do
According to the documentation, there should be a full set of keys for the first three players on a single keyboard. However, using w4 run-native on Linux, key input seems to violate the documentation in the following ways:
- Dot and comma don’t do anything (they should be player 1 X and Z).
- None of the numpad keys, which are supposed to be for player 3, do anything.
- W, Y, J, and V, despite not being documented as doing anything, are player 1 Z.
- K, C, and spacebar, despite not being documented as doing anything, are player 1 X.
Also, according to this page, there should be a bunch of hotkeys that do things in the emulator. None of them appear to do anything.
This is all tested with version 2.5.4, which was the version I got by downloading the Linux ZIP file here. I’m using an ordinary QWERTY keyboard (albeit one with NKRO), and Xorg.
Hi, thanks for flagging this!
- Dot and comma don’t do anything (they should be player 1 X and Z).
- None of the numpad keys, which are supposed to be for player 3, do anything.
The native runtime doesn't currently listen to keys for players 3 and 4, but it should be easy to add.
- W, Y, J, and V, despite not being documented as doing anything, are player 1 Z.
- K, C, and spacebar, despite not being documented as doing anything, are player 1 X.
Some of these undocumented keys are actually to support Dvorak and German keyboards, as it looks like minifb has a limitation of not being able to map to a physical key location.
If you'd like to help with a PR, the source is here: https://github.com/aduros/wasm4/blob/b3d390f6d0d6f8045fd3b9ea3a47afd83a53ff39/runtimes/native/src/backend/window_minifb.c#L27-L72