我要评分
获取效率
正确性
完整性
易理解

Data Definition

The TI data types include VmiTouchInputData (touchpad) and VmiKeyInputData (keyboard).

VmiTouchInputData

Data types of the touchpad input are defined as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
// Touch event
struct VmiTouchEvent {
    uint8_t pointerID;
    uint8_t action;
    uint16_t x;
    uint16_t y;
    uint16_t pressure;
} __attribute__((packed));
// Touchpad input data
struct VmiTouchInputData {
    uint8_t orientation;                        // Current orientation of the client
    uint16_t uiWidth;                           // Client UI resolution
    uint16_t uiHeight;                          // Client UI resolution
    VmiTouchEvent touchEvent;
} __attribute__((packed));

VmiKeyInputData

Data types of the keyboard input are defined as follows:

1
2
3
4
5
// Keyboard input data
struct VmiKeyInputData {
    uint16_t keyCode;
    uint16_t action;
} __attribute__((packed));