Expand description
Smart key interface and implementations.
The core interface for the smart keymap library is key::Key,
and its associated key::Context, PendingKeyState
, and key::KeyState types.
Together, these are used to define smart key behaviour.
Modules§
- callback
- Keymap Callback keys
- caps_
word - CapsWord key(s).
- chorded
- Chorded keys. (Chording functionality).
- composite
- “Composite” keys; an aggregate type used for a common context and event.
This module implements the
keymap::Key
for a ‘composite’ key, which can be any of the other key definitions, and is the default Key for thekeymap::KeyMap
implementation. - custom
- Custom keys.
- keyboard
- HID Keyboard keys.
- layered
- Layered keys. (Layering functionality).
- 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.
- Keyboard
Modifiers - Bool flags for each of the modifier keys (left ctrl, etc.).
- NoOp
KeyState - A NoOp key state, for keys which do nothing when pressed.
- Scheduled
Event - Schedules a given
T
with Event, for some Schedule.
Enums§
- Event
- Events which are either input, or for a particular Key::Event.
- Event
Error - Errors for TryFrom implementations.
- KeyUsage
- Enum for the different types of key codes.
- Pressed
KeyResult - Pressed Key which may be pending, or a resolved key state.
- Schedule
- Schedule for a ScheduledEvent.
Constants§
- MAX_
KEY_ EVENTS - The maximum number of key events that are emitted Key or KeyState.
- MAX_
KEY_ PATH_ LEN - The maximum length of a key path.
Traits§
- Context
- Used to provide state that may affect behaviour when pressing the key.
- Key
- The interface for
Key
behaviour. - KeyState
- Implements functionality for the pressed key.
Functions§
- key_
path - Constructs key path with the given keymap index.
Type Aliases§
- KeyPath
- Sequence of indices into a key map.