summaryrefslogtreecommitdiff
path: root/src/keyHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyHandler.h')
-rw-r--r--src/keyHandler.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/keyHandler.h b/src/keyHandler.h
new file mode 100644
index 0000000..5c2152c
--- /dev/null
+++ b/src/keyHandler.h
@@ -0,0 +1,21 @@
+#ifndef KEYHANDLER_H
+#define KEYHANDLER_H
+#include<SDL2/SDL.h>
+#include "command.h"
+
+class KeyHandler{
+
+ public:
+ KeyHandler();
+ ~KeyHandler();
+ Command* handleEvent( SDL_Event e );
+ Command* pressed( SDL_Keycode k, Uint16 mod = 0);
+ Command* released( SDL_Keycode k, Uint16 mod = 0);
+
+ // Modifiers: https://wiki.libsdl.org/SDL_Keymod
+ // Keycodes: https://wiki.libsdl.org/SDL_Keycode
+ private:
+ Command* nop;
+};
+
+#endif