Skip to content

Commit c86431e

Browse files
authored
Use DOM codes to identify keys (#19)
* Add dom_codes.py * Use base layout keys, represented as DOM codes * Update controls and README * For some reason, arrows are detected as numpad keys on Windows * Add delvewheel repairing for windows wheels * Add windows path patch for gambatte-core
1 parent f98bfdf commit c86431e

10 files changed

Lines changed: 898 additions & 531 deletions

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,24 +169,27 @@ The emulator uses a single character on screen to display two vertically aligned
169169
Keyboard, game controller and file inputs
170170
-----------------------------------------
171171

172-
Keyboard controls are enabled by default, while game controller controls have to be enabled using `--enable-controller` or `--ec`. The key bindings are not configurable at the moment:
172+
Keyboard controls are enabled by default, while game controller controls have to be enabled using `--enable-controller` or `--ec`.
173173

174-
| Buttons | Keyboard | Controller |
175-
|------------|----------------------|-----------------------|
176-
| Directions | Arrows | Left hat / Left stick |
177-
| A | F / V / Space | Button 0 / Button 3 |
178-
| B | D / C / Alt | Button 1 / Button 2 |
179-
| Start | Right Ctrl / Enter | Button 7 |
180-
| Select | Right Shift / Delete | Button 6 |
174+
The key bindings are not configurable at the moment:
181175

182-
Key releases, which are usually mandatory to play games, cannot be detected through `stdin`. It is then required to access the window system to get access to the key presses. There are a couple of problems with that:
176+
| Buttons | Keyboard with arrows | Keyboard with WASD | Controller |
177+
|------------|----------------------|--------------------|-----------------------|
178+
| Directions | Arrows | W A S D | Left hat / Left stick |
179+
| A | Z | K | Button 0 / Button 3 |
180+
| B | X | J | Button 1 / Button 2 |
181+
| Start | Enter | Enter | Button 7 |
182+
| Select | Right Shift | Right Shift | Button 6 |
183183

184-
- It can be hard to detect the window corresponding to the terminal. With X11, the best solution is to look for the current focused window. For other systems, the fallback solution is to use global hotkeys.
185184

186-
- It only works through SSH for clients with X servers using `ssh -X`, meaning it requires Windows and MacOS users to run an X server. Moreover, it's a bad idea to connect with `-X` to an untrusted server.
185+
| Save state commands | Keyboard |
186+
|---------------------|----------|
187+
| Select slot | 0 to 9 |
188+
| Save state | `[` |
189+
| Load state | `]` |
187190

188-
- Additional permissions might be required to access the window system, especially on MacOS (see [this guide](https://inputs.readthedocs.io/en/latest/user/install.html#mac-permissions))
189191

192+
Since `gambaterm` detects physical key presses, this table indicates the keys [as seen on a QWERTY keyboard](https://www.w3.org/TR/uievents-code/#key-alphanumeric-writing-system). In particular, AZERTY or Bépo user won't need to change their keyboard layout in order to play.
190193
It is also possible to use a bizhawk BK2 input file to play tool-assisted speedruns using the `--input-file` (or `-i`) option.
191194

192195

0 commit comments

Comments
 (0)