Struct Key
pub struct Key<R> {
pub tap: R,
pub hold: R,
pub profile: u8,
pub hold_output: Option<KeyOutput>,
}Expand description
A key with tap-hold functionality.
Fields§
§tap: RThe ‘tap’ key.
hold: RThe ‘hold’ key.
profile: u8Behavior profile index: 0 = Config::default_profile; 1.. = Config::profiles.
hold_output: Option<KeyOutput>HID of the hold binding when it is a keyboard key that is safe to emit while pending.
Nickel fills this in keymap codegen
(ncl/smart_keys/tap_hold/keymap-codegen.ncl)
from the hold leaf.
LeftGUI / RightGUI and non-keyboard holds are None.
Used when Profile::pending_output is PendingOutput::Hold.
Implementations§
Trait Implementations§
impl<R> Copy for Key<R>where
R: Copy,
§impl<'de, R> Deserialize<'de> for Key<R>where
R: Deserialize<'de>,
impl<'de, R> Deserialize<'de> for Key<R>where
R: Deserialize<'de>,
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Key<R>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Key<R>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<R> StructuralPartialEq for Key<R>where
R: PartialEq,
Auto Trait Implementations§
impl<R> Freeze for Key<R>where
R: Freeze,
impl<R> RefUnwindSafe for Key<R>where
R: RefUnwindSafe,
impl<R> Send for Key<R>where
R: Send,
impl<R> Sync for Key<R>where
R: Sync,
impl<R> Unpin for Key<R>where
R: Unpin,
impl<R> UnsafeUnpin for Key<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for Key<R>where
R: UnwindSafe,
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