diff --git a/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h b/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h index 8f9ef9ec11..229d8ded36 100644 --- a/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h +++ b/plugins/Kaleidoscope-Qukeys/src/kaleidoscope/plugin/Qukeys.h @@ -33,14 +33,16 @@ // IWYU pragma: no_include "HIDAliases.h" // DualUse Key definitions for Qukeys in the keymap -#define MT(mod, key) kaleidoscope::plugin::ModTapKey(Key_##mod, Key_##key) +#define MT(mod, key) kaleidoscope::plugin::ModTapKey(Key_##mod, Key_##key) -#define SFT_T(key) MT(LeftShift, key) -#define CTL_T(key) MT(LeftControl, key) -#define ALT_T(key) MT(LeftAlt, key) -#define GUI_T(key) MT(LeftGui, key) +#define SFT_T(key) MT(LeftShift, key) +#define CTL_T(key) MT(LeftControl, key) +#define ALT_T(key) MT(LeftAlt, key) +#define GUI_T(key) MT(LeftGui, key) -#define LT(layer, key) kaleidoscope::plugin::LayerTapKey(layer, Key_##key) +#define LT(layer, key) kaleidoscope::plugin::LayerTapKey(layer, Key_##key) + +#define QK(primary_key, secondary_key) kaleidoscope::plugin::Qukey(primary_key, secondary_key) namespace kaleidoscope { namespace plugin { @@ -55,6 +57,11 @@ constexpr Key LayerTapKey(uint8_t layer, Key tap_key) { (layer << 8) + tap_key.getKeyCode()); } +constexpr Key Qukey(Key primary_key, Key secondary_key) { + return Key(kaleidoscope::ranges::QK_FIRST + + (primary_key.getKeyCode() + secondary_key.getKeyCode()); +} + // Data structure for an individual qukey struct Qukey { // The layer this qukey is mapped on.