blob: 5c2152cc6fbdaf3a74c9f2dc426aac51dd6e9695 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|