From 57fd064192d3caa34557caf3aaad22bc1a2970b2 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 3 Jul 2020 00:10:06 +0200 Subject: [PATCH] examples/Keyboardio/Atreus: Add a Model01-style version info macro Add a Model01-style version info macro (which types `Keyboardio Atreus - $version`) to UPPER+Z. Signed-off-by: Gergely Nagy --- examples/Devices/Keyboardio/Atreus/Atreus.ino | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/examples/Devices/Keyboardio/Atreus/Atreus.ino b/examples/Devices/Keyboardio/Atreus/Atreus.ino index 150550fe..8e1781ff 100644 --- a/examples/Devices/Keyboardio/Atreus/Atreus.ino +++ b/examples/Devices/Keyboardio/Atreus/Atreus.ino @@ -17,6 +17,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef BUILD_INFORMATION +#define BUILD_INFORMATION "locally built" +#endif + #include "Kaleidoscope.h" #include "Kaleidoscope-EEPROM-Settings.h" #include "Kaleidoscope-EEPROM-Keymap.h" @@ -33,7 +37,8 @@ #define TG(n) LockLayer(n) enum { - MACRO_QWERTY + MACRO_QWERTY, + MACRO_VERSION_INFO }; #define Key_Exclamation LSHIFT(Key_1) @@ -82,10 +87,10 @@ KEYMAPS( [UPPER] = KEYMAP_STACKED ( - Key_Insert ,Key_Home ,Key_UpArrow ,Key_End ,Key_PageUp - ,Key_Delete ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_PageDown - ,XXX ,Consumer_VolumeIncrement ,XXX ,XXX ,___ ,___ - ,MoveToLayer(QWERTY) ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___ + Key_Insert ,Key_Home ,Key_UpArrow ,Key_End ,Key_PageUp + ,Key_Delete ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_PageDown + ,M(MACRO_VERSION_INFO) ,Consumer_VolumeIncrement ,XXX ,XXX ,___ ,___ + ,MoveToLayer(QWERTY) ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___ ,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10 ,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11 @@ -117,6 +122,12 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { // the macro in EEPROM, it will keep working after a firmware update. Layer.move(QWERTY); break; + case MACRO_VERSION_INFO: + if (keyToggledOn(keyState)) { + Macros.type(PSTR("Keyboardio Atreus - Kaleidoscope ")); + Macros.type(PSTR(BUILD_INFORMATION)); + } + break; default: break; }