Fix #7793: Do not expose internal input API (#7794)

* Fixed GetFileInformationByHandle initializers

* Fix #7793: Do not expose internal input API

Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU

* Added a warning for problematic slow path keyCodes
This commit is contained in:
akallabeth
2022-04-13 09:34:05 +02:00
committed by GitHub
parent a152dec687
commit 752ac3b479
28 changed files with 142 additions and 91 deletions

View File

@@ -24,7 +24,7 @@
#include "wf_input.h"
#include "wf_info.h"
BOOL wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
BOOL wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT8 code)
{
INPUT keyboard_event;
WINPR_UNUSED(input);
@@ -188,7 +188,7 @@ BOOL wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT1
return TRUE;
}
BOOL wf_peer_keyboard_event_dummy(rdpInput* input, UINT16 flags, UINT16 code)
BOOL wf_peer_keyboard_event_dummy(rdpInput* input, UINT16 flags, UINT8 code)
{
WINPR_UNUSED(input);
WINPR_UNUSED(flags);

View File

@@ -22,13 +22,13 @@
#include "wf_interface.h"
BOOL wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
BOOL wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT8 code);
BOOL wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
BOOL wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
BOOL wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
// dummy versions
BOOL wf_peer_keyboard_event_dummy(rdpInput* input, UINT16 flags, UINT16 code);
BOOL wf_peer_keyboard_event_dummy(rdpInput* input, UINT16 flags, UINT8 code);
BOOL wf_peer_unicode_keyboard_event_dummy(rdpInput* input, UINT16 flags, UINT16 code);
BOOL wf_peer_mouse_event_dummy(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
BOOL wf_peer_extended_mouse_event_dummy(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);