mirror of
https://github.com/YaLTeR/niri.git
synced 2024-10-27 04:07:59 +03:00
per keyboard repeat config
This commit is contained in:
parent
b12396d8a1
commit
f76b3bb794
@ -271,19 +271,24 @@ impl State {
|
|||||||
fn on_keyboard<I: InputBackend>(&mut self, event: I::KeyboardKeyEvent) {
|
fn on_keyboard<I: InputBackend>(&mut self, event: I::KeyboardKeyEvent) {
|
||||||
{
|
{
|
||||||
let device = event.device();
|
let device = event.device();
|
||||||
let xkb = self
|
|
||||||
|
let keyboard_config = self
|
||||||
.niri
|
.niri
|
||||||
.config
|
.config
|
||||||
.borrow()
|
.borrow()
|
||||||
.input
|
.input
|
||||||
.keyboard_named(device.name())
|
.keyboard_named(device.name());
|
||||||
.xkb;
|
|
||||||
|
|
||||||
let keyboard = self.niri.seat.get_keyboard().unwrap();
|
let keyboard = self.niri.seat.get_keyboard().unwrap();
|
||||||
|
|
||||||
if let Err(err) = keyboard.set_xkb_config(self, xkb.to_xkb_config()) {
|
if let Err(err) = keyboard.set_xkb_config(self, keyboard_config.xkb.to_xkb_config()) {
|
||||||
warn!("error updating xkb config: {err:?}");
|
warn!("error updating xkb config: {err:?}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
keyboard.change_repeat_info(
|
||||||
|
keyboard_config.repeat_rate.into(),
|
||||||
|
keyboard_config.repeat_delay.into(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let comp_mod = self.backend.mod_key();
|
let comp_mod = self.backend.mod_key();
|
||||||
|
Loading…
Reference in New Issue
Block a user