mirror of https://github.com/encounter/SDL.git
Only generate key repetition for keys that should repeat on wayland.
This fix repetition on modifier keys, e.g. Control.
This commit is contained in:
parent
a90a2e7582
commit
b11dfd7611
|
@ -987,9 +987,11 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
|
|||
SDL_SendKeyboardText(text);
|
||||
}
|
||||
}
|
||||
if (input->xkb.keymap && WAYLAND_xkb_keymap_key_repeats(input->xkb.keymap, key + 8)) {
|
||||
keyboard_repeat_set(&input->keyboard_repeat, time, scancode, has_text, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct Wayland_Keymap
|
||||
{
|
||||
|
|
|
@ -122,6 +122,7 @@ SDL_WAYLAND_SYM(int, xkb_state_key_get_syms, (struct xkb_state *, xkb_keycode_t,
|
|||
SDL_WAYLAND_SYM(int, xkb_keysym_to_utf8, (xkb_keysym_t, char *, size_t) )
|
||||
SDL_WAYLAND_SYM(struct xkb_keymap *, xkb_keymap_new_from_string, (struct xkb_context *, const char *, enum xkb_keymap_format, enum xkb_keymap_compile_flags))
|
||||
SDL_WAYLAND_SYM(struct xkb_state *, xkb_state_new, (struct xkb_keymap *) )
|
||||
SDL_WAYLAND_SYM(int, xkb_keymap_key_repeats, (struct xkb_keymap *keymap, xkb_keycode_t key) );
|
||||
SDL_WAYLAND_SYM(void, xkb_keymap_unref, (struct xkb_keymap *) )
|
||||
SDL_WAYLAND_SYM(void, xkb_state_unref, (struct xkb_state *) )
|
||||
SDL_WAYLAND_SYM(void, xkb_context_unref, (struct xkb_context *) )
|
||||
|
|
Loading…
Reference in New Issue