|
|
@ -1,6 +1,6 @@
|
|
|
|
/* -*- mode: c++ -*-
|
|
|
|
/* -*- mode: c++ -*-
|
|
|
|
* Kaleidoscope-EEPROM-Keymap-Programmer -- On-the-fly reprogrammable keymap.
|
|
|
|
* Kaleidoscope-EEPROM-Keymap-Programmer -- On-the-fly reprogrammable keymap.
|
|
|
|
* Copyright (C) 2017 Gergely Nagy
|
|
|
|
* Copyright (C) 2017, 2018 Gergely Nagy
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
@ -17,11 +17,12 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <Kaleidoscope.h>
|
|
|
|
#include <Kaleidoscope.h>
|
|
|
|
|
|
|
|
#include <Kaleidoscope-EEPROM-Settings.h>
|
|
|
|
#include <Kaleidoscope-EEPROM-Keymap.h>
|
|
|
|
#include <Kaleidoscope-EEPROM-Keymap.h>
|
|
|
|
#include <Kaleidoscope-EEPROM-Keymap-Programmer.h>
|
|
|
|
#include <Kaleidoscope-EEPROM-Keymap-Programmer.h>
|
|
|
|
#include <Kaleidoscope-Macros.h>
|
|
|
|
#include <Kaleidoscope-Macros.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// *INDENT-OFF*
|
|
|
|
const Key keymaps[][ROWS][COLS] PROGMEM = {
|
|
|
|
const Key keymaps[][ROWS][COLS] PROGMEM = {
|
|
|
|
[0] = KEYMAP_STACKED
|
|
|
|
[0] = KEYMAP_STACKED
|
|
|
|
(M(0), Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
|
|
|
|
(M(0), Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
|
|
|
@ -34,12 +35,13 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
|
|
|
|
|
|
|
|
|
|
|
|
Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip,
|
|
|
|
Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip,
|
|
|
|
Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals,
|
|
|
|
Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals,
|
|
|
|
Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote,
|
|
|
|
Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote,
|
|
|
|
Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus,
|
|
|
|
Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus,
|
|
|
|
|
|
|
|
|
|
|
|
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
|
|
|
|
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
|
|
|
|
Key_NoKey),
|
|
|
|
Key_NoKey),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
// *INDENT-ON*
|
|
|
|
|
|
|
|
|
|
|
|
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
|
|
|
|
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
|
|
|
|
if (macroIndex == 0 && keyToggledOff(keyState)) {
|
|
|
|
if (macroIndex == 0 && keyToggledOff(keyState)) {
|
|
|
@ -49,11 +51,14 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
|
|
|
|
return MACRO_NONE;
|
|
|
|
return MACRO_NONE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KALEIDOSCOPE_INIT_PLUGINS(EEPROMSettings,
|
|
|
|
|
|
|
|
EEPROMKeymapProgrammer,
|
|
|
|
|
|
|
|
EEPROMKeymap,
|
|
|
|
|
|
|
|
Macros);
|
|
|
|
|
|
|
|
|
|
|
|
void setup() {
|
|
|
|
void setup() {
|
|
|
|
Serial.begin(9600);
|
|
|
|
Serial.begin(9600);
|
|
|
|
|
|
|
|
|
|
|
|
Kaleidoscope.use(&EEPROMKeymapProgrammer, &EEPROMKeymap, &Macros);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Kaleidoscope.setup();
|
|
|
|
Kaleidoscope.setup();
|
|
|
|
|
|
|
|
|
|
|
|
Layer.getKey = EEPROMKeymap.getKey;
|
|
|
|
Layer.getKey = EEPROMKeymap.getKey;
|
|
|
|