pub struct MorseProfile(/* private fields */);Expand description
Configuration for morse, tap dance and tap-hold to save some RAM space, manually packed into 32 bits
Implementations§
Source§impl MorseProfile
impl MorseProfile
pub const fn const_default() -> Self
Sourcepub fn unilateral_tap(self) -> Option<bool>
pub fn unilateral_tap(self) -> Option<bool>
If the previous key is on the same “hand”, the current key will be determined as a tap
pub const fn with_unilateral_tap(self, b: Option<bool>) -> Self
Sourcepub fn mode(self) -> Option<MorseMode>
pub fn mode(self) -> Option<MorseMode>
The decision mode of the morse/tap-hold key
- If neither of them is set, the decision is made when timeout
- If permissive_hold is set, same as QMK’s permissive hold: When another key is pressed and released while the current morse key is held, the hold action of current morse key will be triggered https://docs.qmk.fm/tap_hold#tap-or-hold-decision-modes
- if hold_on_other_press is set - triggers hold immediately if any other non-morse key is pressed while the current morse key is held
pub const fn with_mode(self, m: Option<MorseMode>) -> Self
Sourcepub fn hold_timeout_ms(self) -> Option<u16>
pub fn hold_timeout_ms(self) -> Option<u16>
If the key is pressed longer than this, it is accepted as hold (in milliseconds)
if given, should not be zero
pub const fn with_hold_timeout_ms(self, t: Option<u16>) -> Self
pub const fn set_hold_timeout_ms(&mut self, t: u16)
pub const fn set_gap_timeout_ms(&mut self, t: u16)
Sourcepub fn gap_timeout_ms(self) -> Option<u16>
pub fn gap_timeout_ms(self) -> Option<u16>
The time elapsed from the last release of a key is longer than this, it will break the morse pattern (in milliseconds) if given, should not be zero
pub const fn with_gap_timeout_ms(self, t: Option<u16>) -> Self
pub const fn new( unilateral_tap: Option<bool>, mode: Option<MorseMode>, hold_timeout_ms: Option<u16>, gap_timeout_ms: Option<u16>, ) -> Self
Trait Implementations§
Source§impl Clone for MorseProfile
impl Clone for MorseProfile
Source§fn clone(&self) -> MorseProfile
fn clone(&self) -> MorseProfile
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MorseProfile
impl Debug for MorseProfile
Source§impl Default for MorseProfile
impl Default for MorseProfile
Source§impl<'de> Deserialize<'de> for MorseProfile
impl<'de> Deserialize<'de> for MorseProfile
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 From<MorseProfile> for u32
impl From<MorseProfile> for u32
Source§fn from(val: MorseProfile) -> Self
fn from(val: MorseProfile) -> Self
Converts to this type from the input type.
Source§impl From<u32> for MorseProfile
impl From<u32> for MorseProfile
Source§impl MaxSize for MorseProfile
impl MaxSize for MorseProfile
Source§const POSTCARD_MAX_SIZE: usize = 5usize
const POSTCARD_MAX_SIZE: usize = 5usize
The maximum possible size that the serialization of this
type can have, in bytes.
Source§impl PartialEq for MorseProfile
impl PartialEq for MorseProfile
Source§impl Serialize for MorseProfile
impl Serialize for MorseProfile
impl Copy for MorseProfile
impl Eq for MorseProfile
impl StructuralPartialEq for MorseProfile
Auto Trait Implementations§
impl Freeze for MorseProfile
impl RefUnwindSafe for MorseProfile
impl Send for MorseProfile
impl Sync for MorseProfile
impl Unpin for MorseProfile
impl UnwindSafe for MorseProfile
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)