config: allow configuring repeat rates via toml
This commit is contained in:
parent
b374947b45
commit
1a9b7146fd
9 changed files with 241 additions and 2 deletions
|
|
@ -172,6 +172,9 @@ impl Action {
|
|||
}
|
||||
})
|
||||
}
|
||||
Action::SetRepeatRate { rate } => {
|
||||
Box::new(move || s.set_repeat_rate(rate.rate, rate.delay))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -728,6 +731,11 @@ fn load_config(initial_load: bool, persistent: &Rc<PersistentState>) {
|
|||
if let Some(keymap) = config.keymap {
|
||||
state.set_keymap(&keymap);
|
||||
}
|
||||
if let Some(repeat_rate) = config.repeat_rate {
|
||||
persistent
|
||||
.seat
|
||||
.set_repeat_rate(repeat_rate.rate, repeat_rate.delay);
|
||||
}
|
||||
on_new_connector(move |c| {
|
||||
for connector in &config.connectors {
|
||||
if connector.match_.matches(c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue