diff --git a/uwac/include/uwac/uwac.h b/uwac/include/uwac/uwac.h index 63439f909..6c660e29d 100644 --- a/uwac/include/uwac/uwac.h +++ b/uwac/include/uwac/uwac.h @@ -261,6 +261,7 @@ struct uwac_key_event uint32_t raw_key; uint32_t sym; bool pressed; + bool repeated; }; typedef struct uwac_key_event UwacKeyEvent; diff --git a/uwac/libuwac/uwac-input.c b/uwac/libuwac/uwac-input.c index 5a103f9a6..6a00faa22 100644 --- a/uwac/libuwac/uwac-input.c +++ b/uwac/libuwac/uwac-input.c @@ -168,6 +168,7 @@ static void keyboard_repeat_func(UwacTask* task, uint32_t events) key->sym = input->repeat_sym; key->raw_key = input->repeat_key; key->pressed = true; + key->repeated = true; } } @@ -418,6 +419,7 @@ static void keyboard_handle_key(void* data, struct wl_keyboard* keyboard, uint32 keyEvent->sym = sym; keyEvent->raw_key = key; keyEvent->pressed = (state == WL_KEYBOARD_KEY_STATE_PRESSED); + keyEvent->repeated = false; } static void keyboard_handle_modifiers(void* data, struct wl_keyboard* keyboard, uint32_t serial,