From 9c49d5b2ac31d0e33b0eee6256895bcfe783781d Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 26 Jan 2021 17:45:35 +0100 Subject: [PATCH] plugins/Ranges: Fix the Macro key ranges Macro keycodes pre-date the Ranges plugin, so they previously had a keycode that sorted before ranges::FIRST. For the sake of backwards compatibility, we want to keep using the same keycodes. Fixes #1010. Signed-off-by: Gergely Nagy --- plugins/Kaleidoscope-Ranges/src/Kaleidoscope-Ranges.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/Kaleidoscope-Ranges/src/Kaleidoscope-Ranges.h b/plugins/Kaleidoscope-Ranges/src/Kaleidoscope-Ranges.h index dfa4a62b..95874a1d 100644 --- a/plugins/Kaleidoscope-Ranges/src/Kaleidoscope-Ranges.h +++ b/plugins/Kaleidoscope-Ranges/src/Kaleidoscope-Ranges.h @@ -21,6 +21,11 @@ namespace kaleidoscope { namespace ranges { enum : uint16_t { + // Macro ranges pre-date Kaleidoscope-Ranges, so they're coming before + // ranges::FIRST, because we want to keep the keycodes backwards compatible. + MACRO_FIRST = 24576, + MACRO_LAST = MACRO_FIRST + 255, + FIRST = 0xc000, KALEIDOSCOPE_FIRST = FIRST, OS_FIRST, @@ -49,8 +54,6 @@ enum : uint16_t { SC_LAST, REDIAL, TURBO, - MACRO_FIRST, - MACRO_LAST = MACRO_FIRST + 255, DYNAMIC_MACRO_FIRST, DYNAMIC_MACRO_LAST = DYNAMIC_MACRO_FIRST + 31,