[core,input] Add debug log to keyboard state sync

This commit is contained in:
akallabeth
2025-11-18 14:21:26 +01:00
parent e7b0f21568
commit c632a703df
3 changed files with 89 additions and 7 deletions

View File

@@ -52,10 +52,13 @@
#define PTR_XFLAGS_BUTTON2 0x0002
/* Keyboard Toggle Flags */
#define KBD_SYNC_SCROLL_LOCK 0x00000001
#define KBD_SYNC_NUM_LOCK 0x00000002
#define KBD_SYNC_CAPS_LOCK 0x00000004
#define KBD_SYNC_KANA_LOCK 0x00000008
enum KBD_SYNC_FLAGS
{
KBD_SYNC_SCROLL_LOCK = 0x00000001,
KBD_SYNC_NUM_LOCK = 0x00000002,
KBD_SYNC_CAPS_LOCK = 0x00000004,
KBD_SYNC_KANA_LOCK = 0x00000008
};
#define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4
@@ -116,6 +119,18 @@ extern "C"
UINT16 x, UINT16 y);
FREERDP_API BOOL freerdp_input_send_focus_in_event(rdpInput* input, UINT16 toggleStates);
/** @brief stringify \b enum KBD_SYNC_FLAGS
*
* @param flags \b enum KBD_SYNC_FLAGS flags
* @param buffer A buffer to store the resulting string
* @param len The length of the buffer in bytes
*
* @return A pointer to \ref buffer or \b NULL in case of failure
* @since version 3.19.0
*/
FREERDP_API const char* freerdp_input_keyboard_flags_string(uint32_t flags, char* buffer,
size_t len);
#ifdef __cplusplus
}
#endif