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
|
|
@ -584,6 +584,10 @@ fn config_changed(config: cosmic_config::Config, keys: Vec<String>, state: &mut
|
|||
.collect::<Vec<_>>();
|
||||
for seat in seats.into_iter() {
|
||||
if let Some(keyboard) = seat.get_keyboard() {
|
||||
keyboard.change_repeat_info(
|
||||
(value.repeat_rate as i32).abs(), // Negative values are illegal
|
||||
(value.repeat_delay as i32).abs(),
|
||||
);
|
||||
if let Err(err) = keyboard.set_xkb_config(state, xkb_config_to_wl(&value)) {
|
||||
error!(?err, "Failed to load provided xkb config");
|
||||
// TODO Revert to default?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue