Add sdl2 key mappings
Former-commit-id: 9b3aa941ffca9a679d9ce70ca43d6396d4dfe5ff
This commit is contained in:
parent
4a72a1035f
commit
f40ee148ea
|
@ -125,6 +125,12 @@ fn keycode_to_keypad(keycode: Keycode) -> Option<keypad::Keys> {
|
|||
Keycode::Down => Some(keypad::Keys::Down),
|
||||
Keycode::Left => Some(keypad::Keys::Left),
|
||||
Keycode::Right => Some(keypad::Keys::Right),
|
||||
Keycode::Z => Some(keypad::Keys::ButtonB),
|
||||
Keycode::X => Some(keypad::Keys::ButtonA),
|
||||
Keycode::Return => Some(keypad::Keys::Start),
|
||||
Keycode::Space => Some(keypad::Keys::Select),
|
||||
Keycode::A => Some(keypad::Keys::ButtonL),
|
||||
Keycode::S => Some(keypad::Keys::ButtonR),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue