numpad support for #83

This commit is contained in:
Dustin Carlino 2020-06-23 10:29:14 -07:00
parent 05cf8c113f
commit ca22d63671
2 changed files with 12 additions and 10 deletions

View File

@ -14,6 +14,8 @@ Grab a pre-built binary release -- updated every Sunday, announced at
- If clicking buttons seems to be a bit off, might be
[this issue](https://github.com/dabreegster/abstreet/issues/65). Workaround
is to manually resize the window, then maximize again.
- If the game immediately crashes, it might be a
[graphics card problem](https://github.com/dabreegster/abstreet/issues/79).
- Mac:
https://github.com/dabreegster/abstreet/releases/download/v0.2.0a/abstreet_mac_v0_2_0a.zip
- There are some issues with HiDPI Retina displays; please report any

View File

@ -327,16 +327,16 @@ impl Key {
VirtualKeyCode::X => Key::X,
VirtualKeyCode::Y => Key::Y,
VirtualKeyCode::Z => Key::Z,
VirtualKeyCode::Key1 => Key::Num1,
VirtualKeyCode::Key2 => Key::Num2,
VirtualKeyCode::Key3 => Key::Num3,
VirtualKeyCode::Key4 => Key::Num4,
VirtualKeyCode::Key5 => Key::Num5,
VirtualKeyCode::Key6 => Key::Num6,
VirtualKeyCode::Key7 => Key::Num7,
VirtualKeyCode::Key8 => Key::Num8,
VirtualKeyCode::Key9 => Key::Num9,
VirtualKeyCode::Key0 => Key::Num0,
VirtualKeyCode::Key1 | VirtualKeyCode::Numpad1 => Key::Num1,
VirtualKeyCode::Key2 | VirtualKeyCode::Numpad2 => Key::Num2,
VirtualKeyCode::Key3 | VirtualKeyCode::Numpad3 => Key::Num3,
VirtualKeyCode::Key4 | VirtualKeyCode::Numpad4 => Key::Num4,
VirtualKeyCode::Key5 | VirtualKeyCode::Numpad5 => Key::Num5,
VirtualKeyCode::Key6 | VirtualKeyCode::Numpad6 => Key::Num6,
VirtualKeyCode::Key7 | VirtualKeyCode::Numpad7 => Key::Num7,
VirtualKeyCode::Key8 | VirtualKeyCode::Numpad8 => Key::Num8,
VirtualKeyCode::Key9 | VirtualKeyCode::Numpad9 => Key::Num9,
VirtualKeyCode::Key0 | VirtualKeyCode::Numpad0 => Key::Num0,
VirtualKeyCode::LBracket => Key::LeftBracket,
VirtualKeyCode::RBracket => Key::RightBracket,
VirtualKeyCode::Space => Key::Space,