autotyper/xkeyhandler.h

27 lines
558 B
C
Raw Normal View History

2019-10-26 13:16:22 +00:00
#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