From 1736db27b4203718403124a3f05b51072d1b3494 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Tue, 21 Apr 2020 16:31:33 +0200 Subject: [PATCH] anvil: set saner values for key repeat rate --- anvil/src/udev.rs | 2 +- anvil/src/winit.rs | 2 +- src/wayland/seat/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/anvil/src/udev.rs b/anvil/src/udev.rs index 03917cc..a83cd1b 100644 --- a/anvil/src/udev.rs +++ b/anvil/src/udev.rs @@ -186,7 +186,7 @@ pub fn run_udev(mut display: Display, mut event_loop: EventLoop, log *cursor_status.lock().unwrap() = new_status; }); let keyboard = w_seat - .add_keyboard(XkbConfig::default(), 1000, 500, |seat, focus| { + .add_keyboard(XkbConfig::default(), 200, 25, |seat, focus| { set_data_device_focus(seat, focus.and_then(|s| s.as_ref().client())) }) .expect("Failed to initialize the keyboard"); diff --git a/anvil/src/winit.rs b/anvil/src/winit.rs index bdf13e5..19c7a9b 100644 --- a/anvil/src/winit.rs +++ b/anvil/src/winit.rs @@ -101,7 +101,7 @@ pub fn run_winit( }); let keyboard = seat - .add_keyboard(XkbConfig::default(), 1000, 500, |seat, focus| { + .add_keyboard(XkbConfig::default(), 200, 25, |seat, focus| { set_data_device_focus(seat, focus.and_then(|s| s.as_ref().client())) }) .expect("Failed to initialize the keyboard"); diff --git a/src/wayland/seat/mod.rs b/src/wayland/seat/mod.rs index 1d8796a..46d6d60 100644 --- a/src/wayland/seat/mod.rs +++ b/src/wayland/seat/mod.rs @@ -263,8 +263,8 @@ impl Seat { /// variant: "nodeadkeys", /// ..XkbConfig::default() /// }, - /// 1000, - /// 500, + /// 200, + /// 25, /// |seat, focus| { /// /* This closure is called whenever the keyboard focus /// * changes, with the new focus as argument */