Kaleidoscope
Namespaces | Macros | Variables
OneShot.cpp File Reference
#include <Kaleidoscope-OneShot.h>
Include dependency graph for OneShot.cpp:

Namespaces

 kaleidoscope
 

Macros

#define isOS(key)   (key.raw >= ranges::OS_FIRST && key.raw <= ranges::OS_LAST)
 
#define isModifier(key)   (key.raw >= Key_LeftControl.raw && key.raw <= Key_RightGui.raw)
 
#define isLayerKey(key)   (key.flags == (KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP) && key.keyCode >= MOMENTARY_OFFSET && key.keyCode <= MOMENTARY_OFFSET + 23)
 
#define isOneShot(idx)   (bitRead (state_.all, (idx)))
 
#define setOneShot(idx)   (bitWrite (state_.all, idx, 1))
 
#define clearOneShot(idx)   (bitWrite (state_.all, idx, 0))
 
#define isSticky(idx)   (bitRead (sticky_state_.all, idx))
 
#define setSticky(idx)   (bitWrite (sticky_state_.all, idx, 1))
 
#define clearSticky(idx)   bitWrite (sticky_state_.all, idx, 0)
 
#define setPressed(idx)   bitWrite(pressed_state_.all, idx, 1)
 
#define clearPressed(idx)   bitWrite(pressed_state_.all, idx, 0)
 
#define isPressed(idx)   bitRead (pressed_state_.all, idx)
 
#define isSameAsPrevious(key)   (key.raw == prev_key_.raw)
 
#define saveAsPrevious(key)   prev_key_.raw = key.raw
 
#define hasTimedOut()   (millis () - start_time_ >= time_out)
 

Variables

kaleidoscope::OneShot OneShot
 

Macro Definition Documentation

◆ clearOneShot

#define clearOneShot (   idx)    (bitWrite (state_.all, idx, 0))

◆ clearPressed

#define clearPressed (   idx)    bitWrite(pressed_state_.all, idx, 0)

◆ clearSticky

#define clearSticky (   idx)    bitWrite (sticky_state_.all, idx, 0)

◆ hasTimedOut

#define hasTimedOut ( )    (millis () - start_time_ >= time_out)

◆ isLayerKey

#define isLayerKey (   key)    (key.flags == (KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP) && key.keyCode >= MOMENTARY_OFFSET && key.keyCode <= MOMENTARY_OFFSET + 23)

◆ isModifier

#define isModifier (   key)    (key.raw >= Key_LeftControl.raw && key.raw <= Key_RightGui.raw)

◆ isOneShot

#define isOneShot (   idx)    (bitRead (state_.all, (idx)))

◆ isOS

#define isOS (   key)    (key.raw >= ranges::OS_FIRST && key.raw <= ranges::OS_LAST)

◆ isPressed

#define isPressed (   idx)    bitRead (pressed_state_.all, idx)

◆ isSameAsPrevious

#define isSameAsPrevious (   key)    (key.raw == prev_key_.raw)

◆ isSticky

#define isSticky (   idx)    (bitRead (sticky_state_.all, idx))

◆ saveAsPrevious

#define saveAsPrevious (   key)    prev_key_.raw = key.raw

◆ setOneShot

#define setOneShot (   idx)    (bitWrite (state_.all, idx, 1))

◆ setPressed

#define setPressed (   idx)    bitWrite(pressed_state_.all, idx, 1)

◆ setSticky

#define setSticky (   idx)    (bitWrite (sticky_state_.all, idx, 1))

Variable Documentation

◆ OneShot