examples: Make all the examples use the KEYMAPS macro

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/431/head
Gergely Nagy 6 years ago
parent ea6c133dea
commit ff0728e1ff
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -22,8 +22,7 @@
#include <Kaleidoscope-LED-Palette-Theme.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -40,7 +39,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*

@ -18,7 +18,7 @@
#include <Kaleidoscope.h>
#include <Kaleidoscope-Cycle.h>
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -35,7 +35,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_Cycle),
};
)
void cycleAction(Key previous_key, uint8_t cycle_count) {
if (previous_key.raw == Key_E.raw) {

@ -18,7 +18,7 @@
#include <Kaleidoscope.h>
#include <Kaleidoscope-CycleTimeReport.h>
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -36,7 +36,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
KALEIDOSCOPE_INIT_PLUGINS(CycleTimeReport);

@ -22,7 +22,7 @@
#include <Kaleidoscope-Macros.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(M(0), Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -39,7 +39,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {

@ -19,7 +19,7 @@
#include <Kaleidoscope-EEPROM-Settings.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -36,7 +36,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(EEPROMSettings);

@ -20,7 +20,7 @@
#include <Kaleidoscope-Escape-OneShot.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -58,7 +58,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
___, ___, ___, ___,
___
),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(OneShot,

@ -25,7 +25,7 @@
#include "LED-Off.h"
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -42,7 +42,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,

@ -19,7 +19,7 @@
#include <Kaleidoscope-FocusSerial.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -36,7 +36,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-OFF*
namespace kaleidoscope {

@ -21,7 +21,7 @@
#include <Kaleidoscope-Macros.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(___, ___, ___, ___, ___, ___, M(0),
___, ___, ___, ___, ___, ___, ___,
@ -38,7 +38,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
___, ___, ___, ___,
___),
};
)
// *INDENT-ON*
class EventDropper_ : public kaleidoscope::Plugin {

@ -21,7 +21,7 @@
#include <Kaleidoscope-Heatmap.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -38,7 +38,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,

@ -20,7 +20,7 @@
#include <Kaleidoscope-HostOS.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -37,7 +37,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(EEPROMSettings, HostOS);

@ -21,7 +21,7 @@
#include <Kaleidoscope-HostPowerManagement.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -40,7 +40,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey
),
};
)
// *INDENT-ON*
void hostPowerManagementEventHandler(kaleidoscope::plugin::HostPowerManagement::Event event) {

@ -19,7 +19,8 @@
#include <Kaleidoscope-LEDControl.h>
#include <Kaleidoscope-LED-ActiveModColor.h>
const Key keymaps[][ROWS][COLS] PROGMEM = {
// *INDENT-OFF*
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
@ -37,7 +38,8 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,
ActiveModColorEffect);

@ -21,7 +21,7 @@
#include <Kaleidoscope-Macros.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, M(0),
@ -39,7 +39,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
const macro_t *macroAction(uint8_t macro_index, uint8_t key_state) {

@ -20,6 +20,7 @@
#include <Kaleidoscope-LED-Palette-Theme.h>
#include <Kaleidoscope-EEPROM-Settings.h>
#include <Kaleidoscope-FocusSerial.h>
namespace example {
class TestLEDMode : public kaleidoscope::LEDMode {
@ -58,7 +59,7 @@ TestLEDMode::onFocusEvent(const char *command) {
example::TestLEDMode TestLEDMode;
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
@ -76,7 +77,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(Focus, LEDPaletteTheme, TestLEDMode, EEPROMSettings);

@ -20,7 +20,7 @@
#include <Kaleidoscope-LED-Stalker.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
@ -38,7 +38,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,

@ -20,7 +20,7 @@
#include <Kaleidoscope-LEDEffect-BootGreeting.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
@ -38,7 +38,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,

@ -21,7 +21,7 @@
#include "LED-Off.h"
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
@ -39,7 +39,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(LEDControl,

@ -19,7 +19,7 @@
#include <Kaleidoscope-Leader.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -36,7 +36,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
LEAD(0)),
};
)
// *INDENT-ON*
static void leaderTestA(uint8_t seq_index) {

@ -30,7 +30,7 @@ void kindOfMagic(uint8_t combo_index) {
USE_MAGIC_COMBOS([KIND_OF_MAGIC] = {.action = kindOfMagic, .keys = {R3C6, R3C9}});
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -48,7 +48,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(MagicCombo, Macros);

@ -25,7 +25,7 @@ enum {
};
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -61,7 +61,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
___, ___, ___, ___,
___),
};
)
// *INDENT-ON*
void macroOneShotAltControl(uint8_t keyState) {

@ -32,7 +32,7 @@ bool kaleidoscope::plugin::Redial::shouldRemember(Key mapped_key) {
}
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -50,7 +50,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_Redial),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(Redial);

@ -19,7 +19,7 @@
#include <Kaleidoscope-ShapeShifter.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip,
@ -37,7 +37,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_NoKey),
};
)
// *INDENT-ON*
static const kaleidoscope::plugin::ShapeShifter::dictionary_t shape_shift_dictionary[] PROGMEM = {

@ -19,7 +19,7 @@
#include <Kaleidoscope-SpaceCadet.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_SpaceCadetEnable,
@ -37,7 +37,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(SpaceCadet);

@ -21,7 +21,7 @@
#include <Kaleidoscope-Steno.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
@ -55,7 +55,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
S(E), S(U), XXX, S(RE2),
___),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(GeminiPR);

@ -23,7 +23,7 @@
#include <kaleidoscope/hid.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -41,7 +41,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
SYSTER),
};
)
// *INDENT-ON*
void systerAction(kaleidoscope::plugin::Syster::action_t action, const char *symbol) {

@ -19,7 +19,7 @@
#include <Kaleidoscope-TapDance.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -37,7 +37,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
TD(1)),
};
)
// *INDENT-ON*
static void tapDanceEsc(uint8_t tap_dance_index, uint8_t tap_count, kaleidoscope::TapDance::ActionType tap_dance_action) {

@ -19,7 +19,7 @@
#include <Kaleidoscope-TopsyTurvy.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, TOPSY(1), TOPSY(2), TOPSY(3), TOPSY(4), TOPSY(5), Key_NoKey,
@ -37,7 +37,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(TopsyTurvy);

@ -20,7 +20,7 @@
#include <Kaleidoscope-TypingBreaks.h>
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -38,7 +38,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
KALEIDOSCOPE_INIT_PLUGINS(EEPROMSettings, TypingBreaks);

@ -25,7 +25,7 @@ enum { MACRO_KEYBOARD_EMOJI };
// *INDENT-OFF*
const Key keymaps[][ROWS][COLS] PROGMEM = {
KEYMAPS(
[0] = KEYMAP_STACKED
(
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
@ -43,8 +43,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip),
};
)
// *INDENT-ON*
static void unicode(uint32_t character, uint8_t keyState) {

Loading…
Cancel
Save