Partager via


2.2.8.1.1.3.1.1.7 Relative Mouse Event (TS_RELPOINTER_EVENT)

The TS_RELPOINTER_EVENT structure is used to specify relative mouse pointer movement (as opposed to absolute positioning). Support for the Relative Mouse Event is advertised in the Input Capability Set (section 2.2.7.1.6).


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

pointerFlags

xDelta

yDelta

pointerFlags (2 bytes): A 16-bit unsigned integer. Contains flags that describe the pointer event.

Mouse movement event.

Flag

Meaning

PTRFLAGS_MOVE

0x0800

Indicates that the mouse pointer MUST be moved using the delta specified by the xDelta and yDelta fields.

Mouse button events.

Flag

Meaning

PTRFLAGS_DOWN

0x8000

Indicates that a press event has occurred at the position resulting from the application of the xDelta and yDelta fields to the previous position. The button flags indicate which button has been pressed and at least one of these flags MUST be set.

PTRFLAGS_BUTTON1

0x1000

Mouse button 1 (left button) was pressed or released. If the PTRFLAGS_DOWN flag is set, then the button was pressed; otherwise, it was released.

PTRFLAGS_BUTTON2

0x2000

Mouse button 2 (right button) was pressed or released. If the PTRFLAGS_DOWN flag is set, then the button was pressed; otherwise, it was released.

PTRFLAGS_BUTTON3

0x4000

Mouse button 3 (middle button or wheel) was pressed or released. If the PTRFLAGS_DOWN flag is set, then the button was pressed; otherwise, it was released.

PTRXFLAGS_BUTTON1

0x0001

Extended mouse button 1 (also referred to as button 4) was pressed or released. If the PTRXFLAGS_DOWN flag is set, the button was pressed; otherwise, it was released.

PTRXFLAGS_BUTTON2

0x0002

Extended mouse button 2 (also referred to as button 5) was pressed or released. If the PTRXFLAGS_DOWN flag is set, the button was pressed; otherwise, it was released.

xDelta (2 bytes): A 16-bit signed integer. The distance the pointer has moved on the x-axis since the previous position update was sent. Negative values indicate that the pointer is moving to the left.

yDelta (2 bytes): A 16-bit signed integer. The distance the pointer has moved on the y-axis since the previous position update was sent. Negative values indicate that the pointer is moving up.