Skip to main content

rmk_types/action/
keyboard.rs

1//! Keyboard control actions.
2
3use postcard::experimental::max_size::MaxSize;
4use serde::{Deserialize, Serialize};
5
6/// Actions for controlling the keyboard or changing the keyboard's state, for example, enable/disable a particular function
7#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize, MaxSize)]
8#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[cfg_attr(feature = "_codegen", derive(strum::VariantNames))]
10#[non_exhaustive]
11#[cfg_attr(feature = "wasm", derive(tsify::Tsify))]
12#[cfg_attr(feature = "wasm", tsify(into_wasm_abi, from_wasm_abi))]
13pub enum KeyboardAction {
14    Bootloader,
15    Reboot,
16    DebugToggle,
17    ClearEeprom,
18    OutputAuto,
19    OutputUsb,
20    OutputBluetooth,
21    ComboOn,
22    ComboOff,
23    ComboToggle,
24    CapsWordToggle,
25}