P
PyBoy7mo ago
Julius

[Solved] PyBoy Keyboard mapping

Update: I just saw the keymappings are in the installation page on https://github.com/Baekalfen/PyBoy/wiki/Installation#starting-pyboy I skipped over that page, because I just used pip install and it worked. -------- When running pyboy with the sample code:
from pyboy import PyBoy
pyboy = PyBoy('game_rom.gb')
while pyboy.tick():
pass
pyboy.stop()
from pyboy import PyBoy
pyboy = PyBoy('game_rom.gb')
while pyboy.tick():
pass
pyboy.stop()
It starts and I can use "a" and the arrow keys to navigate the game. But for example b, start and select don't work, or I haven't found how to use them. Any ideas? Also, I somehow made a savestate and pressing "x" loads it, but I have no clue how I made it. I couldn't find anything about this in the api docs, is there another place I could look? But chances are I'm just blind and overread it...^^
GitHub
Installation
Game Boy emulator written in Python. Contribute to Baekalfen/PyBoy development by creating an account on GitHub.
1 Reply
Bækalfen
Bækalfen7mo ago
Glad you found it! It also shows if you start the emulator from the terminal:
$ pyboy game.gb

The Game Boy controls are as follows:

| Keyboard key | GameBoy equivalant |
| --- | --- |
| Up | Up |
| Down | Down |
| Left | Left |
| Right | Right |
| A | A |
| S | B |
| Return | Start |
| Backspace | Select |

The other controls for the emulator:

| Keyboard key | Emulator function |
| --- | --- |
| F11 | Toggle fullscreen |
| Escape | Quit |
| D | Debug |
| Space | Unlimited FPS |
| Z | Save state |
| X | Load state |
| I | Toggle screen recording |
| O | Save screenshot |
| , | Rewind backwards |
| . | Rewind forward |
| J | Memory Window + 0x100 |
| K | Memory Window - 0x100 |
| Shift + J | Memory Window + 0x1000 |
| Shift + K | Memory Window - 0x1000 |

See "pyboy --help" for how to enable rewind and other awesome features!
$ pyboy game.gb

The Game Boy controls are as follows:

| Keyboard key | GameBoy equivalant |
| --- | --- |
| Up | Up |
| Down | Down |
| Left | Left |
| Right | Right |
| A | A |
| S | B |
| Return | Start |
| Backspace | Select |

The other controls for the emulator:

| Keyboard key | Emulator function |
| --- | --- |
| F11 | Toggle fullscreen |
| Escape | Quit |
| D | Debug |
| Space | Unlimited FPS |
| Z | Save state |
| X | Load state |
| I | Toggle screen recording |
| O | Save screenshot |
| , | Rewind backwards |
| . | Rewind forward |
| J | Memory Window + 0x100 |
| K | Memory Window - 0x100 |
| Shift + J | Memory Window + 0x1000 |
| Shift + K | Memory Window - 0x1000 |

See "pyboy --help" for how to enable rewind and other awesome features!

Did you find this page helpful?