27 lines
558 B
C++
27 lines
558 B
C++
#ifndef XKEYHANDLER_H
|
|
#define XKEYHANDLER_H
|
|
|
|
#include <X11/Xlib.h>
|
|
#include "keyhandler.h"
|
|
|
|
#include <map>
|
|
|
|
class XKeyHandler : public KeyHandler
|
|
{
|
|
public:
|
|
XKeyHandler();
|
|
virtual ~XKeyHandler() override;
|
|
|
|
virtual void Key(SpecialKey key, KeyModifiers mods = KeyModifiers::KM_NONE) override;
|
|
virtual void Key(char key, KeyModifiers mods = KeyModifiers::KM_NONE) override;
|
|
|
|
private:
|
|
void HandleModifierKeys(KeyModifiers mods, bool press);
|
|
static std::map<SpecialKey, KeySym> s_keymap;
|
|
|
|
Display* m_disp;
|
|
|
|
};
|
|
|
|
#endif // XKEYHANDLER_H
|