summaryrefslogtreecommitdiffstats
path: root/src/input/x11FakeKeyboardHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/x11FakeKeyboardHandler.h')
-rw-r--r--src/input/x11FakeKeyboardHandler.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/input/x11FakeKeyboardHandler.h b/src/input/x11FakeKeyboardHandler.h
index 3dde7cc..7f2d12e 100644
--- a/src/input/x11FakeKeyboardHandler.h
+++ b/src/input/x11FakeKeyboardHandler.h
@@ -19,10 +19,21 @@
#include "inputEventHandler.h"
-class X11FakeKeyboardHandler : public DefaultInputEventHandler<InputEvent::ET_KEY>
+/**
+ * Send keyboard events via the XTest extension.
+ * This is unbelievably brittle in the face of non-system-standard keyboard
+ * mappings. Every Linux distribution seems to set up XTest handling in
+ * a different way. The code goes out of its way to find a usable mapping
+ * and use it.
+ */
+class X11FakeKeyboardHandler : public InputEventHandler<
+ input_policy::Match<InputEvent::ET_KEY, InputEvent::EC_PRESS>,
+ input_policy::Match<InputEvent::ET_KEY, InputEvent::EC_RELEASE>,
+ input_policy::Require<input_policy::X11GUI>,
+ input_policy::Unprivileged>
{
public:
- void handle(InputEvent const&, InputEventContext const* = 0);
+ void doHandle(InputEvent const&, InputEventContext const* = 0);
void initialize();
};