mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-09-07 11:44:43 +00:00
use a separate repeat-rate for keybindings
This commit is contained in:
parent
4456f4536a
commit
05278fb6ce
@ -60,6 +60,7 @@ static const struct xkb_rule_names xkb_rules = {
|
||||
.options = NULL,
|
||||
};
|
||||
|
||||
static const int keybinding_repeat_rate = 0;
|
||||
static const int repeat_rate = 25;
|
||||
static const int repeat_delay = 600;
|
||||
|
||||
|
6
dwl.c
6
dwl.c
@ -1686,11 +1686,11 @@ keyrepeat(void *data)
|
||||
{
|
||||
KeyboardGroup *group = data;
|
||||
int i;
|
||||
if (!group->nsyms || group->wlr_group->keyboard.repeat_info.rate <= 0)
|
||||
int krr = keybinding_repeat_rate; // avoids div-by-zero warning
|
||||
if (group->nsyms <= 0 || krr <= 0)
|
||||
return 0;
|
||||
|
||||
wl_event_source_timer_update(group->key_repeat_source,
|
||||
1000 / group->wlr_group->keyboard.repeat_info.rate);
|
||||
wl_event_source_timer_update(group->key_repeat_source, 1000 / krr);
|
||||
|
||||
for (i = 0; i < group->nsyms; i++)
|
||||
keybinding(group->mods, group->keysyms[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user