..NAV
NES/GameBoy | Keyboard | Gamepad |
---|---|---|
A Button | Z key | Button 3 |
B Button | X key | Button 2 |
START Button | Enter/Return | Button 9 |
SELECT Button | Right Shift key | Button 10 |
Up | Up arrow | Up Hat |
Down | Down arrow | Down Hat |
Left | Left arrow | Left Hat |
Right | Right arrow | Right Hat |
button.handle_input()
Checks for button presses. Call this in your game loop; without it you'll have no input!
button.is_pressed(button)
Checks to see if a button was just pressed.button
should be any of the button constants.
button.is_held(button)
Checks to see if a button is being held.button
should be any of the button constants.