pub struct Config<const CONDITIONAL_LAYER_COUNT: usize = 0> {
pub sticky_timeout: Option<u16>,
pub conditional_layers: Slice<ConditionalLayer, CONDITIONAL_LAYER_COUNT>,
}Expand description
Configuration for layered keys / sticky layers / conditional layers.
Fields§
§sticky_timeout: Option<u16>Timeout (ms) after which an unused sticky layer deactivates.
When None, sticky layers stay active until another key is used.
The timeout starts when a sticky layer modifier is released without interruption (sticky committed). If another key is pressed while sticky is active, the timeout is cancelled / ignored.
conditional_layers: Slice<ConditionalLayer, CONDITIONAL_LAYER_COUNT>Rules that activate a then-layer when all of their if-layers are active.
Implementations§
Trait Implementations§
Source§impl<'de, const CONDITIONAL_LAYER_COUNT: usize> Deserialize<'de> for Config<CONDITIONAL_LAYER_COUNT>
impl<'de, const CONDITIONAL_LAYER_COUNT: usize> Deserialize<'de> for Config<CONDITIONAL_LAYER_COUNT>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<const CONDITIONAL_LAYER_COUNT: usize> PartialEq for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> PartialEq for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> Copy for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> StructuralPartialEq for Config<CONDITIONAL_LAYER_COUNT>
Auto Trait Implementations§
impl<const CONDITIONAL_LAYER_COUNT: usize> Freeze for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> RefUnwindSafe for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> Send for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> Sync for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> Unpin for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> UnsafeUnpin for Config<CONDITIONAL_LAYER_COUNT>
impl<const CONDITIONAL_LAYER_COUNT: usize> UnwindSafe for Config<CONDITIONAL_LAYER_COUNT>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more