Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
InputDeviceXLib.h
1#ifndef CINPUTDEVICEXLIB_H
2#define CINPUTDEVICEXLIB_H
3
4#pragma once
5#include "InputDevice.h"
6// Author: Kang Lin <kl222@126.com>
7
8#include <X11/XKBlib.h>
9
11{
12public:
13 explicit CInputDeviceXLib();
14 virtual ~CInputDeviceXLib();
15
16 virtual int KeyEvent(quint32 keysym, quint32 keycode, bool down = true);
17 virtual int MouseEvent(MouseButtons buttons, QPoint pos);
18 virtual int MouseEvent(MouseButtons buttons, int x, int y);
19
20private:
21 KeyCode XkbKeysymToKeycode(Display* dpy, KeySym keysym);
22 const unsigned short *codeMap;
23 unsigned codeMapLen;
24 std::map<KeySym, KeyCode> pressedKeys;
25 /*
26 Send keyboard events straight through and
27 avoid mapping them to the current keyboard layout
28 */
29 bool rawKeyboard;
30};
31
32#endif // CINPUTDEVICEXLIB_H