summaryrefslogtreecommitdiff
path: root/src/keyboard.h
blob: fd4680e47b45495cdc38fee5f74d63ee09369c98 (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 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