Enum kll_core::CapabilityRun
source · #[repr(u8)]
pub enum CapabilityRun {
Show 24 variants
NoOp {
state: CapabilityEvent,
},
Rotate {
state: CapabilityEvent,
index: u8,
increment: i8,
},
LayerClear {
state: CapabilityEvent,
},
LayerState {
state: CapabilityEvent,
layer: u8,
layer_state: State,
},
LayerRotate {
state: CapabilityEvent,
direction: Direction,
},
HidProtocol {
state: CapabilityEvent,
mode: Protocol,
},
HidKeyboard {
state: CapabilityEvent,
id: Keyboard,
},
HidKeyboardState {
state: CapabilityEvent,
id: Keyboard,
key_state: State,
},
HidConsumerControl {
state: CapabilityEvent,
id: ConsumerControl,
},
HidSystemControl {
state: CapabilityEvent,
id: SystemControl,
},
McuFlashMode {
state: CapabilityEvent,
},
HidLed {
state: CapabilityEvent,
id: LedIndicator,
},
PixelAnimationControl {
state: CapabilityEvent,
mode: AnimationControl,
},
PixelAnimationIndex {
state: CapabilityEvent,
index: u16,
},
PixelFadeControl {
state: CapabilityEvent,
profile: u8,
command: FadeCommand,
arg: u8,
},
PixelFadeLayer {
state: CapabilityEvent,
layer: u8,
},
PixelFadeSet {
state: CapabilityEvent,
profile: u8,
config: u8,
period: u8,
},
PixelGammaControl {
state: CapabilityEvent,
mode: GammaControl,
},
PixelLedControl {
state: CapabilityEvent,
mode: LedControl,
amount: u8,
},
PixelTest {
state: CapabilityEvent,
test: PixelTest,
index: u16,
},
Analog {
state: CapabilityEvent,
},
HidioOpenUrl {
state: CapabilityEvent,
index: u16,
},
HidioUnicodeString {
state: CapabilityEvent,
index: u16,
},
HidioUnicodeState {
state: CapabilityEvent,
unicode: char,
},
}
Expand description
CapabilityRun Used to run capabilities rather than map them out in a result guide
Variants
NoOp
Fields
state: CapabilityEvent
No-op / None action 4 bytes
Rotate
Rotation event trigger 6 bytes
LayerClear
Fields
state: CapabilityEvent
Clears all layer states NOTE: Does not send trigger events 4 bytes
LayerState
Updates layer to the specified state 6 bytes
LayerRotate
Rotates through possible layers given the direction Uses internal state to keep track of the current layer 5 bytes
HidProtocol
HID Protocol Mode 5 bytes
HidKeyboard
USB HID keyboard event Handles press/released based on incoming state 5 bytes
HidKeyboardState
USB HID keyboard event Force state event 6 bytes
HidConsumerControl
USB HID Consumer Control Event Handles press/released based on incoming state 6 bytes
HidSystemControl
USB HID System Control Event Handles press/released based on incoming state 5 bytes
McuFlashMode
Fields
state: CapabilityEvent
Enter Flash Mode Usually jumps to the bootloader 4 bytes
HidLed
USB HID Led event Handles press/released based on incoming state 5 bytes
PixelAnimationControl
Overall animation control 5 bytes
PixelAnimationIndex
Activates the given indexed Animation 6 bytes
PixelFadeControl
Fade control 7 bytes
PixelFadeLayer
Layer fade 5 bytes
PixelFadeSet
Fade set profile 7 bytes
PixelGammaControl
Enable/Disable/Toggle gamma correction 5 bytes
PixelLedControl
LED Control 6 bytes
PixelTest
Pixel test 7 bytes
Analog
Fields
state: CapabilityEvent
Analog Event Always a passthrough event 4 bytes
HidioOpenUrl
Sends URL (using index stored unicode string) to host computer web browser 6 bytes
HidioUnicodeString
Sends Unicode string (using index stored unicode string) to host computer 6 bytes
HidioUnicodeState
Sends Unicode character with state (Press or Release) 8 bytes
Implementations
sourceimpl CapabilityRun
impl CapabilityRun
pub fn state(&self) -> CapabilityEvent
Trait Implementations
sourceimpl Clone for CapabilityRun
impl Clone for CapabilityRun
sourcefn clone(&self) -> CapabilityRun
fn clone(&self) -> CapabilityRun
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for CapabilityRun
impl Debug for CapabilityRun
sourceimpl From<Capability> for CapabilityRun
impl From<Capability> for CapabilityRun
Convert Capability to CapabilityRun Used for mainly for kll validation