mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-10-11 19:14:08 +00:00
Add MODIFIER_EXTENDED flag to indicate extended keys
This commit is contained in:
@@ -941,6 +941,9 @@ int LiSendKeyboardEvent2(short keyCode, char keyAction, char modifiers, char fla
|
|||||||
// No fixups
|
// No fixups
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MODIFIER_EXTENDED is a Sunshine extension
|
||||||
|
modifiers &= ~MODIFIER_EXTENDED;
|
||||||
}
|
}
|
||||||
|
|
||||||
holder->packet.keyboard.header.size = BE32(sizeof(NV_KEYBOARD_PACKET) - sizeof(uint32_t));
|
holder->packet.keyboard.header.size = BE32(sizeof(NV_KEYBOARD_PACKET) - sizeof(uint32_t));
|
||||||
|
|||||||
@@ -694,12 +694,17 @@ int LiSendMouseButtonEvent(char action, int button);
|
|||||||
// This function queues a keyboard event to be sent to the remote server.
|
// This function queues a keyboard event to be sent to the remote server.
|
||||||
// Key codes are Win32 Virtual Key (VK) codes and interpreted as keys on
|
// Key codes are Win32 Virtual Key (VK) codes and interpreted as keys on
|
||||||
// a US English layout.
|
// a US English layout.
|
||||||
|
//
|
||||||
|
// MODIFIER_EXTENDED indicates an extended key (0xE0 scancode prefix).
|
||||||
|
// This is required to distinguish between certain keys like Enter
|
||||||
|
// and Numpad Enter that share the same VK code.
|
||||||
#define KEY_ACTION_DOWN 0x03
|
#define KEY_ACTION_DOWN 0x03
|
||||||
#define KEY_ACTION_UP 0x04
|
#define KEY_ACTION_UP 0x04
|
||||||
#define MODIFIER_SHIFT 0x01
|
#define MODIFIER_SHIFT 0x01
|
||||||
#define MODIFIER_CTRL 0x02
|
#define MODIFIER_CTRL 0x02
|
||||||
#define MODIFIER_ALT 0x04
|
#define MODIFIER_ALT 0x04
|
||||||
#define MODIFIER_META 0x08
|
#define MODIFIER_META 0x08
|
||||||
|
#define MODIFIER_EXTENDED 0x10
|
||||||
int LiSendKeyboardEvent(short keyCode, char keyAction, char modifiers);
|
int LiSendKeyboardEvent(short keyCode, char keyAction, char modifiers);
|
||||||
|
|
||||||
// Similar to LiSendKeyboardEvent() but allows the client to inform the host that
|
// Similar to LiSendKeyboardEvent() but allows the client to inform the host that
|
||||||
|
|||||||
Reference in New Issue
Block a user