summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
new file mode 100644
index 0000000..fd4680e
--- /dev/null
+++ b/src/keyboard.h
@@ -0,0 +1,21 @@
+#ifndef KEYHANDLER_H
+#define KEYHANDLER_H
+#include<SDL2/SDL.h>
+#include "command.h"
+
+class Keyboard{
+
+ public:
+ Keyboard();
+ ~Keyboard();
+ 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