2.2.8.1.1.3.1.1.3 Mouse Event (TS_POINTER_EVENT)
The TS_POINTER_EVENT structure is a standard T.128 Pointing Device Event ([T128] section 8.18.1). RDP adds flags to deal with wheel mice and extended mouse buttons.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pointerFlags |
xPos |
||||||||||||||||||||||||||||||
yPos |
pointerFlags (2 bytes): A 16-bit, unsigned integer. Contains flags that describe the pointer event.
-
Mouse wheel event.
-
Flag
Meaning
PTRFLAGS_HWHEEL
0x0400
The event is a horizontal mouse wheel rotation. The only valid flags in a horizontal wheel rotation event are PTRFLAGS_WHEEL_NEGATIVE and the WheelRotationMask; all other pointer flags are ignored. This flag MUST NOT be sent to a server that does not indicate support for horizontal mouse wheel events in the Input Capability Set (section 2.2.7.1.6).
PTRFLAGS_WHEEL
0x0200
The event is a vertical mouse wheel rotation. The only valid flags in a vertical wheel rotation event are PTRFLAGS_WHEEL_NEGATIVE and the WheelRotationMask; all other pointer flags are ignored.
PTRFLAGS_WHEEL_NEGATIVE
0x0100
The wheel rotation value (contained in the WheelRotationMask bit field) is negative and MUST be sign-extended before injection at the server.
WheelRotationMask
0x01FF
The bit field describing the number of rotation units the mouse wheel was rotated. The value is negative if the PTRFLAGS_WHEEL_NEGATIVE flag is set.
-
If both PTRFLAGS_WHEEL and PTRFLAGS_HWHEEL are specified, then PTRFLAGS_WHEEL takes precedence.
-
Mouse movement event.
-
Flag
Meaning
PTRFLAGS_MOVE
0x0800
Indicates that the mouse position MUST be updated to the location specified by the xPos and yPos fields.
-
Mouse button events.
-
Flag
Meaning
PTRFLAGS_DOWN
0x8000
Indicates that a press event has occurred at the position specified by the xPos and yPos fields. 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.
xPos (2 bytes): A 16-bit, unsigned integer. The x-coordinate of the pointer relative to the top-left corner of the server's desktop. This field SHOULD be ignored by the server if either the PTRFLAGS_WHEEL (0x0200) or the PTRFLAGS_HWHEEL (0x0400) flag is specified in the pointerFlags field.
yPos (2 bytes): A 16-bit, unsigned integer. The y-coordinate of the pointer relative to the top-left corner of the server's desktop. This field SHOULD be ignored by the server if either the PTRFLAGS_WHEEL (0x0200) or the PTRFLAGS_HWHEEL (0x0400) flag is specified in the pointerFlags field.