玉兔远程控制
0.1.0-bate11
Toggle main menu visibility
载入中...
搜索中...
未找到
Service
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
10
class
CInputDeviceXLib :
public
CInputDevice
11
{
12
public
:
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
20
private
:
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
作者:康林 (kl222@126.com)
版权所有(c) 康林工作室 保留所有权力