evdevil/
key_repeat.rs

1/// Key repeat settings.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3#[repr(C)]
4pub struct KeyRepeat {
5    pub(crate) delay: u32,
6    pub(crate) period: u32,
7}
8
9impl KeyRepeat {
10    pub const fn new(delay: u32, period: u32) -> Self {
11        Self { delay, period }
12    }
13
14    pub fn delay(&self) -> u32 {
15        self.delay
16    }
17
18    pub fn period(&self) -> u32 {
19        self.period
20    }
21}