From 5b30391383be7e31ae1b213f2a6095bd7a95defc Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 18 Apr 2018 23:19:23 +1000 Subject: Make key repeat configurable This creates two input commands for configuring the repeat delay and rate. Example config: input "myidentifier" { repeat_delay 250 repeat_rate 25 } --- sway/config/input.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sway/config') diff --git a/sway/config/input.c b/sway/config/input.c index 5e657c43..a9f20723 100644 --- a/sway/config/input.c +++ b/sway/config/input.c @@ -29,6 +29,8 @@ struct input_config *new_input_config(const char* identifier) { input->pointer_accel = FLT_MIN; input->scroll_method = INT_MIN; input->left_handed = INT_MIN; + input->repeat_delay = INT_MIN; + input->repeat_rate = INT_MIN; return input; } @@ -59,6 +61,12 @@ void merge_input_config(struct input_config *dst, struct input_config *src) { if (src->pointer_accel != FLT_MIN) { dst->pointer_accel = src->pointer_accel; } + if (src->repeat_delay != INT_MIN) { + dst->repeat_delay = src->repeat_delay; + } + if (src->repeat_rate != INT_MIN) { + dst->repeat_rate = src->repeat_rate; + } if (src->scroll_method != INT_MIN) { dst->scroll_method = src->scroll_method; } -- cgit v1.2.3