summaryrefslogtreecommitdiffhomepage
path: root/main/keyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/keyboard.cpp')
-rw-r--r--main/keyboard.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/main/keyboard.cpp b/main/keyboard.cpp
index 90be44e2..a700d0f4 100644
--- a/main/keyboard.cpp
+++ b/main/keyboard.cpp
@@ -9,20 +9,24 @@ void app::do_key(KeyEvent::Key k, KeyEvent::Modifiers m, bool pressed, bool repe
(void)m;
(void)repeated;
- const key x = fm_begin(switch (k) {
- using enum KeyEvent::Key;
- using enum key;
+ const key x = fm_begin(switch (k)
+ {
+ using enum KeyEvent::Key;
+ using enum key;
+ default: return COUNT;
case W: return camera_up;
case A: return camera_left;
case S: return camera_down;
case D: return camera_right;
case Home: return camera_reset;
+ case R: return rotate_tile;
+ case F5: return quicksave;
+ case F9: return quickload;
case Esc: return quit;
- default: return MAX;
});
- if (x != key::MAX)
+ if (x != key::COUNT)
keys[x] = pressed;
}