Skip to content

Commit

Permalink
Change default repeat to 600
Browse files Browse the repository at this point in the history
Right now, as far as I understand, 660 comes from Xorg, but 25 comes
from wlroots. Let's make the two come from the same source.
  • Loading branch information
YaLTeR committed Sep 16, 2023
1 parent b66b439 commit 4fcdcdf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
13 changes: 5 additions & 8 deletions resources/default-config.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@

input {
keyboard {
// Control the repeat rate of the keyboard.

// Repeat delay in milliseconds.
repeat-delay 660

// Repeat rate in characters per second.
repeat-rate 25

xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
Expand All @@ -19,6 +11,11 @@ input {
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
}

// You can set the keyboard repeat parameters. The defaults match wlroots and sway.
// Delay is in milliseconds before the repeat starts. Rate is in characters per second.
// repeat-delay 600
// repeat-rate 25
}

// Next sections contain libinput settings.
Expand Down
9 changes: 4 additions & 5 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ pub struct Input {
pub struct Keyboard {
#[knuffel(child, default)]
pub xkb: Xkb,
// The default value represents the one used by Xorg.
#[knuffel(child, unwrap(argument), default = 660)]
// The defaults were chosen to match wlroots and sway.
#[knuffel(child, unwrap(argument), default = 600)]
pub repeat_delay: u16,
// The default value represents the one used by Xorg.
#[knuffel(child, unwrap(argument), default = 25)]
pub repeat_rate: u8,
}
Expand Down Expand Up @@ -250,7 +249,7 @@ mod tests {
r#"
input {
keyboard {
repeat-delay 660
repeat-delay 600
repeat-rate 25
xkb {
layout "us,ru"
Expand Down Expand Up @@ -285,7 +284,7 @@ mod tests {
options: Some("grp:win_space_toggle".to_owned()),
..Default::default()
},
repeat_delay: 660,
repeat_delay: 600,
repeat_rate: 25,
},
touchpad: Touchpad {
Expand Down

0 comments on commit 4fcdcdf

Please sign in to comment.