Repository: libsdl-org/SDL
File: include/SDL3/SDL_hints.h (C/C++)

Code before:
 */
#define SDL_HINT_WINDOWS_GAMEINPUT   "SDL_WINDOWS_GAMEINPUT"

/**
 * A variable controlling whether raw keyboard events are used on Windows.
 *
 * The variable can be set to the following values:
 *
 * - "0": The Windows message loop is used for keyboard events. (default)
 * - "1": Low latency raw keyboard events are used.
 *
 * This hint can be set anytime.
 *
 * \since This hint is available since SDL 3.2.0.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"

/**
 * A variable controlling whether to block hotkeys when raw keyboard events are enabled.
 *
 * The variable can be set to the following values:
 *
 * - "0": Hotkeys are not blocked. (default)
 * - "1": Hotkeys are blocked.
 *
 * This hint must be set before SDL is initialized.
 *
 * \since This hint is available since SDL 3.2.16.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_NOHOTKEY "SDL_WINDOWS_RAW_KEYBOARD_NOHOTKEY"

/**
 * A variable controlling whether SDL uses Kernel Semaphores on Windows.
 *
 * Kernel Semaphores are inter-process and require a context switch on every
 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
 * Using that and atomics to implement semaphores increases performance. SDL
 * will fall back to Kernel Objects on older OS versions or if forced to by
 * this hint.
 *
 * The variable can be set to the following values:
 *
 * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall
 *   back to Kernel Objects. (default)
 * - "1": Force the use of Kernel Objects in all cases.
 *
 * This hint should be set before SDL is initialized.
 *
 * \since This hint is available since SDL 3.2.0.
 */
#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"

Review comment (suggestion):
It's possible to make this hint apply dynamically: just restart the raw input thread / re-register the devices. Having it dynamic would make it more useful, as games could enable windows hotkeys when in menus or when paused, but disable it when in active gameplay.

Code after:
 */
#define SDL_HINT_WINDOWS_GAMEINPUT   "SDL_WINDOWS_GAMEINPUT"

/**
 * A variable controlling whether raw keyboard events are used on Windows.
 *
 * The variable can be set to the following values:
 *
 * - "0": The Windows message loop is used for keyboard events. (default)
 * - "1": Low latency raw keyboard events are used.
 *
 * This hint can be set anytime.
 *
 * \since This hint is available since SDL 3.2.0.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD "SDL_WINDOWS_RAW_KEYBOARD"

/**
 * A variable controlling whether or not the RIDEV_NOHOTKEYS flag is set when 
 * enabling Windows raw keyboard events. 
 *
 * This blocks any hotkeys that have been registered by applications from 
 * having any effect beyond generating raw WM_INPUT events. 
 *
 * This flag does not affect system-hotkeys like ALT-TAB or CTRL-ALT-DEL,
 * but does affect the Windows Logo key since it is a userland hotkey registered
 * by explorer.exe.
 *
 * The variable can be set to the following values:
 *
 * - "0": Hotkeys are not excluded. (default)
 * - "1": Hotkeys are excluded.
 *
 * This hint can be set anytime.
 *
 * \since This hint is available since SDL 3.4.0.
 */
#define SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"

/**
 * A variable controlling whether SDL uses Kernel Semaphores on Windows.
 *
 * Kernel Semaphores are inter-process and require a context switch on every
 * interaction. On Windows 8 and newer, the WaitOnAddress API is available.
 * Using that and atomics to implement semaphores increases performance. SDL
 * will fall back to Kernel Objects on older OS versions or if forced to by
 * this hint.
 *
 * The variable can be set to the following values:
 *
 * - "0": Use Atomics and WaitOnAddress API when available, otherwise fall