diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-18 23:19:23 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-18 23:19:23 +1000 |
commit | 5b30391383be7e31ae1b213f2a6095bd7a95defc (patch) | |
tree | 96ad3f77bf2538401d5538e0e0ba9c12c99f32b6 /sway/config/input.c | |
parent | d668d5789238f1e2865599cf1b7ffeb518ee8318 (diff) |
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
}
Diffstat (limited to 'sway/config/input.c')
-rw-r--r-- | sway/config/input.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |