mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-26 17:24:27 +00:00
Added SDL_HINT_MUTE_CONSOLE_KEYBOARD
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user