[−][src]Enum keyberon::action::Action
The different actions that can be done.
Variants (Non-exhaustive)
No operation action: just do nothing.
Transparent, i.e. get the action from the default layer. On
the default layer, it is equivalent to NoOp
.
KeyCode(KeyCode)
A key code, i.e. the classical key.
MultipleKeyCodes(&'static [KeyCode])
Multiple key codes send at the same time, as it you press all these keys at the same time. Useful to send shifted key, or complex short cuts as Ctrl+Alt+Del in a single key press.
MultipleActions(&'static [Action])
Multiple actions send at the same time.
While pressed, change the current layer. That's the classical
Fn key. If several layer actions are active at the same time,
their number are summed. For example, if you press at the same
time Layer(1)
and Layer(2)
, layer 3 will be active.
Change the default layer.
If the key is hold more than timeout
units of time (usually
milliseconds), performs the hold
action, else performs the
tap
action. Mostly used with a modifier for the hold action
and a classical key on the tap action. Any action can be
performed, but using a HoldTap
in an HoldTap
is not
specified (but guaranteed to not crash).
Fields of HoldTap
Implementations
impl Action
[src]
pub fn layer(self) -> Option<usize>
[src]
Gets the layer number if the action is the Layer
action.
pub fn key_codes<'a>(&'a self) -> impl Iterator<Item = KeyCode> + 'a
[src]
Returns an iterator on the KeyCode
corresponding to the action.
Trait Implementations
impl Clone for Action
[src]
fn clone(&self) -> Action
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Action
[src]
impl Debug for Action
[src]
impl Eq for Action
[src]
impl PartialEq<Action> for Action
[src]
impl StructuralEq for Action
[src]
impl StructuralPartialEq for Action
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,