#ifndef MGLPP_KEYBOARD_HPP
#define MGLPP_KEYBOARD_HPP

#include <stdint.h>

namespace mgl {
    class Keyboard {
    public:
        /* Has to match mgl_key */
        enum Key : int {
            Unknown,
            A,
            B,
            C,
            D,
            E,
            F,
            G,
            H,
            I,
            J,
            K,
            L,
            M,
            N,
            O,
            P,
            Q,
            R,
            S,
            T,
            U,
            V,
            W,
            X,
            Y,
            Z,
            Num0,
            Num1,
            Num2,
            Num3,
            Num4,
            Num5,
            Num6,
            Num7,
            Num8,
            Num9,
            Escape,
            LControl,
            LShift,
            LAlt,
            LSystem,
            RControl,
            RShift,
            RAlt,
            RSystem,
            Menu,
            LBracket,
            RBracket,
            Semicolon,
            Comma,
            Period,
            Quote,
            Slash,
            Backslash,
            Tilde,
            Equal,
            Hyphen,
            Space,
            Enter,
            Backspace,
            Tab,
            PageUp,
            PageDown,
            End,
            Home,
            Insert,
            Delete,
            Add,
            Subtract,
            Multiply,
            Divide,
            Left,
            Right,
            Up,
            Down,
            Numpad0,
            Numpad1,
            Numpad2,
            Numpad3,
            Numpad4,
            Numpad5,
            Numpad6,
            Numpad7,
            Numpad8,
            Numpad9,
            F1,
            F2,
            F3,
            F4,
            F5,
            F6,
            F7,
            F8,
            F9,
            F10,
            F11,
            F12,
            F13,
            F14,
            F15,
            Pause,
            Printscreen,
            NumpadEnter,
            AudioLowerVolume,
            AudioRaiseVolume,
            AudioPlay,
            AudioStop,
            AudioPause,
            AudioMute,
            AudioPrev,
            AudioNext,
            AudioRewind,
            AudioForward,
            DeadAcute,
            Apostrophe,
            F16,
            F17,
            F18,
            F19,
            F20,
            F21,
            F22,
            F23,
            F24,
            EXCLAM,
            QUOTEDBL,
            NUMBERSIGN,
            DOLLAR,
            PERCENT,
            AMPERSAND,
            PARENLEFT,
            PARENRIGHT,
            ASTERISK,
            PLUS,
            MINUS,
            COLON,
            LESS,
            GREATER,
            QUESTION,
            BRACKETLEFT,
            BRACKETRIGHT,
            ASCIICIRCUM,
            UNDERSCORE,
            GRAVE,

            /* This should always be the last key */
            __NumKeys__
        };

        /* Returns nullptr if unknown key */
        static const char* key_to_string(Key key);
        static bool key_is_modifier(Key key);
        static uint64_t key_to_x11_keysym(Key key);
    };
}

#endif /* MGLPP_KEYBOARD_HPP */
