feat: configurable keyboard repeat rate and delay
This commit is contained in:
parent
b3c606fdf6
commit
dcc4873e60
3 changed files with 29 additions and 3 deletions
|
|
@ -186,13 +186,21 @@ pub fn create_seat(
|
|||
// So instead of doing the right thing (and initialize these capabilities as matching
|
||||
// devices appear), we have to surrender to reality and just always expose a keyboard and pointer.
|
||||
let conf = config.xkb_config();
|
||||
if let Err(err) = seat.add_keyboard(xkb_config_to_wl(&conf), 600, 25) {
|
||||
if let Err(err) = seat.add_keyboard(
|
||||
xkb_config_to_wl(&conf),
|
||||
(conf.repeat_delay as i32).abs(),
|
||||
(conf.repeat_rate as i32).abs(),
|
||||
) {
|
||||
warn!(
|
||||
?err,
|
||||
"Failed to load provided xkb config. Trying default...",
|
||||
);
|
||||
seat.add_keyboard(XkbConfig::default(), 600, 25)
|
||||
.expect("Failed to load xkb configuration files");
|
||||
seat.add_keyboard(
|
||||
XkbConfig::default(),
|
||||
(conf.repeat_delay as i32).abs(),
|
||||
(conf.repeat_rate as i32).abs(),
|
||||
)
|
||||
.expect("Failed to load xkb configuration files");
|
||||
}
|
||||
seat.add_pointer();
|
||||
seat.add_touch();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue