Module tap_hold

Source
Expand description

Tap-Hold keys.

§JSON

use smart_keymap::key::keyboard;
use smart_keymap::key::tap_hold::Key;
let json = r#"
  { "hold": { "key_code": 224 }, "tap": { "key_code": 4 } }
"#;
let expected_key: Key<keyboard::Key> = Key {
  hold: keyboard::Key::new(224),
  tap: keyboard::Key::new(4),
};
let actual_key: Key<keyboard::Key> = serde_json::from_str(json).unwrap();
assert_eq!(expected_key, actual_key);

Structs§

Config
Configuration settings for tap hold keys.
Context
Context for Key.
Key
A key with tap-hold functionality.
PendingKeyState
The state of a pressed tap-hold key.

Enums§

Event
Events emitted by a tap-hold key.
InterruptResponse
How the tap hold key should respond to interruptions (input events from other keys).
TapHoldState
The state of a tap-hold key.

Constants§

DEFAULT_CONFIG
Default tap hold config.
DEFAULT_CONTEXT
Default context.