File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -4128,6 +4128,20 @@ extern "C" {
4128
4128
*/
4129
4129
#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"
4130
4130
4131
+ /**
4132
+ * A variable controlling whether to block hotkeys when raw keyboard events are enabled.
4133
+ *
4134
+ * The variable can be set to the following values:
4135
+ *
4136
+ * - "0": Hotkeys are not blocked. (default)
4137
+ * - "1": Hotkeys are blocked.
4138
+ *
4139
+ * This hint must be set before SDL is initialized.
4140
+ *
4141
+ * \since This hint is available since SDL 3.2.16.
4142
+ */
4143
+ #define SDL_HINT_WINDOWS_RAW_KEYBOARD_NOHOTKEY "SDL_WINDOWS_RAW_KEYBOARD_NOHOTKEY"
4144
+
4131
4145
/**
4132
4146
* A variable controlling whether SDL uses Kernel Semaphores on Windows.
4133
4147
*
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ static DWORD WINAPI WIN_RawInputThread(LPVOID param)
77
77
if (data -> flags & ENABLE_RAW_KEYBOARD_INPUT ) {
78
78
devices [count ].usUsagePage = USB_USAGEPAGE_GENERIC_DESKTOP ;
79
79
devices [count ].usUsage = USB_USAGE_GENERIC_KEYBOARD ;
80
- devices [count ].dwFlags = 0 ;
80
+ devices [count ].dwFlags = SDL_GetHintBoolean ( SDL_HINT_WINDOWS_RAW_KEYBOARD_NOHOTKEY ) ? 0x200 : 0 ;
81
81
devices [count ].hwndTarget = window ;
82
82
++ count ;
83
83
}
You can’t perform that action at this time.
0 commit comments