diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-08 15:47:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 15:47:11 -0500 |
commit | eb4e91f96d206ff05ac7f6bb1972bf48f45e5e5e (patch) | |
tree | eab75ecb0f188786cd78286d09ebffb525ae74e1 /include/wlr | |
parent | 381a646d2fbcb1b488e1551438444ac267f39138 (diff) | |
parent | 2c6e52c164cfd19bac642d3507fb8584a0201845 (diff) |
Merge pull request #474 from emersion/customize-repeat-info
Make keyboard repeat info configurable
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_keyboard.h | 12 | ||||
-rw-r--r-- | include/wlr/types/wlr_seat.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_keyboard.h b/include/wlr/types/wlr_keyboard.h index e2d50b03..450cd473 100644 --- a/include/wlr/types/wlr_keyboard.h +++ b/include/wlr/types/wlr_keyboard.h @@ -52,9 +52,15 @@ struct wlr_keyboard { } modifiers; struct { + int32_t rate; + int32_t delay; + } repeat_info; + + struct { struct wl_signal key; struct wl_signal modifiers; struct wl_signal keymap; + struct wl_signal repeat_info; } events; void *data; @@ -74,6 +80,12 @@ struct wlr_event_keyboard_key { void wlr_keyboard_set_keymap(struct wlr_keyboard *kb, struct xkb_keymap *keymap); +/** + * Sets the keyboard repeat info. `rate` is in key repeats/second and delay is + * in milliseconds. + */ +void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate, + int32_t delay); void wlr_keyboard_led_update(struct wlr_keyboard *keyboard, uint32_t leds); uint32_t wlr_keyboard_get_modifiers(struct wlr_keyboard *keyboard); diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 6d59315b..6c04380e 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -146,6 +146,7 @@ struct wlr_seat_keyboard_state { struct wl_listener keyboard_destroy; struct wl_listener keyboard_keymap; + struct wl_listener keyboard_repeat_info; struct wl_listener surface_destroy; struct wl_listener resource_destroy; |