aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2022-01-03 17:23:23 -0800
committerSimon Ser <contact@emersion.fr>2022-01-04 10:55:05 +0100
commitb8995ced8fb0a4c48300190dfd610f7420aca795 (patch)
treed7df6fce7a1d43133543b0c64c519e93f8aa743a /sway
parenteaeb173a4b9b22d8ba1b35d3d863f0dcb8595341 (diff)
[IPC] Add repeat delay/rate info to keyboard
Closes #6735 wlroots already has the info in the struct so let's access it and print it out.
Diffstat (limited to 'sway')
-rw-r--r--sway/ipc-json.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 1b64f86e..8357ae04 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -980,6 +980,11 @@ json_object *ipc_json_describe_input(struct sway_input_device *device) {
struct wlr_keyboard *keyboard = device->wlr_device->keyboard;
struct xkb_keymap *keymap = keyboard->keymap;
struct xkb_state *state = keyboard->xkb_state;
+
+ json_object_object_add(object, "repeat_delay",
+ json_object_new_int(keyboard->repeat_info.delay));
+ json_object_object_add(object, "repeat_rate",
+ json_object_new_int(keyboard->repeat_info.rate));
json_object *layouts_arr = json_object_new_array();
json_object_object_add(object, "xkb_layout_names", layouts_arr);