mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
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
}
This commit is contained in:
parent
d668d57892
commit
5b30391383
9 changed files with 88 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue