Skip to main content

Module key

Module key 

Source
Expand description

Smart key interface and implementations.

The core interface is key::System, and its associated key::Context, PendingKeyState, and key::KeyState types.

Modules§

automation
Automation (macro) keys.
callback
Keymap Callback keys
caps_word
CapsWord key(s).
chorded
Chorded keys. (Chording functionality).
consumer
Consumer keys.
custom
Custom keys.
history
History keys (e.g. Repeat last output). History keys: behaviours that depend on previously resolved key output.
keyboard
HID Keyboard keys.
layered
Layered keys. (Layering functionality).
mod_conditioned
Mod-conditioned keys (dual bind gated on held modifiers + report suppress). Mod-conditioned keys: dual binding gated on held modifiers, with optional report-level suppression of those modifiers (ZMK mod-morph / QMK key-override style).
mouse
Mouse keys.
sequence
Sequence keys (QMK leader-style ordered sequences). Sequence keys (ordered key sequences).
sticky
Sticky Modifier keys.
tap_dance
Tap-Dance keys.
tap_hold
Tap-Hold keys.

Structs§

KeyEvents
Events emitted when a key is pressed.
KeyOutput
Struct for the output from KeyState.
KeyboardModifiers
Bool flags for each of the modifier keys (left ctrl, etc.).
MouseOutput
Struct for the mouse output.
NoOpKeyState
A NoOp key state, for keys which do nothing when pressed.
ScheduledEvent
An Event with a Schedule for the keymap event scheduler.

Enums§

Event
Events which are either input, or for a particular System::Event.
EventError
Errors for TryFrom implementations.
KeyUsage
Enum for the different types of key codes.
NewPressedKey
Newtype for invoking new_pressed_key on the key for the given ref.
PressedKeyResult
Pressed Key which may be pending, or a resolved key state.
Schedule
When the event scheduler should deliver a ScheduledEvent.

Constants§

MAX_KEY_EVENTS
The maximum number of key events that are emitted by crate::key::System implementations.

Traits§

Context
Used to provide state that may affect behaviour when pressing the key.
KeyState
Implements functionality for the pressed key.
System
The interface for key System behaviour.

Type Aliases§

NewPressedKeyOutput
Outcome of System::new_pressed_key.