-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinput.h
More file actions
30 lines (23 loc) · 759 Bytes
/
input.h
File metadata and controls
30 lines (23 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: LGPL-3.0-or-later
// Header file for virtual input devices
#ifndef INPUT_H
#define INPUT_H
#include "common.h"
#include "framebuffer.h"
#include <linux/input.h>
#include <linux/uinput.h>
#include <rfb/keysym.h>
#define BTN_LEFT_MASK 0x1
#define BTN_MIDDLE_MASK 0x2
#define BTN_RIGHT_MASK 0x4
#define WHEEL_UP_MASK 0x8
#define WHEEL_DOWN_MASK 0x10
void initVirtualKeyboard(void);
void initVirtualPointer(void);
void closeVirtualKeyboard(void);
void closeVirtualPointer(void);
void writeEvent(int udev, uint16_t type, uint16_t code, int value);
int keySym2Scancode(rfbKeySym key);
void addKeyboardEvent(rfbBool down, rfbKeySym key, rfbClientPtr cl);
void addPointerEvent(int buttonMask, int x, int y, rfbClientPtr cl);
#endif