Added SDL_HINT_MUTE_CONSOLE_KEYBOARD

This commit is contained in:
Sam Lantinga committed 2024-08-05 08:54:10 -07:00
1 parent afde1cc9c2
commit 746b8eb14b
4 files changed
+21 -4

No files matched your search

+2 -2
View File
@@ -264,8 +264,8 @@ SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void)
SDL_free(kbd->key_map);
kbd->key_map = &keymap_default_us_acc;
}
/* Allow inhibiting keyboard mute with env. variable for debugging etc. */
if (SDL_getenv("SDL_INPUT_FREEBSD_KEEP_KBD") == NULL) {
if (SDL_GetHintBoolean(SDL_HINT_MUTE_CONSOLE_KEYBOARD, SDL_TRUE)) {
/* Take keyboard from console and open the actual keyboard device.
* Ensures that the keystrokes do not leak through to the console.
*/
+1 -2
View File
@@ -473,8 +473,7 @@ void SDL_EVDEV_kbd_set_muted(SDL_EVDEV_keyboard_state *state, SDL_bool muted)
}
if (muted) {
/* Allow inhibiting keyboard mute with env. variable for debugging etc. */
if (SDL_getenv("SDL_INPUT_LINUX_KEEP_KBD") == NULL) {
if (SDL_GetHintBoolean(SDL_HINT_MUTE_CONSOLE_KEYBOARD, SDL_TRUE)) {
/* Mute the keyboard so keystrokes only generate evdev events
* and do not leak through to the console
*/