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 <algernon@keyboard.io>
pull/872/head
Gergely Nagy 5 years ago
parent 36eb7d04cc
commit 57fd064192
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -17,6 +17,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef BUILD_INFORMATION
#define BUILD_INFORMATION "locally built"
#endif
#include "Kaleidoscope.h" #include "Kaleidoscope.h"
#include "Kaleidoscope-EEPROM-Settings.h" #include "Kaleidoscope-EEPROM-Settings.h"
#include "Kaleidoscope-EEPROM-Keymap.h" #include "Kaleidoscope-EEPROM-Keymap.h"
@ -33,7 +37,8 @@
#define TG(n) LockLayer(n) #define TG(n) LockLayer(n)
enum { enum {
MACRO_QWERTY MACRO_QWERTY,
MACRO_VERSION_INFO
}; };
#define Key_Exclamation LSHIFT(Key_1) #define Key_Exclamation LSHIFT(Key_1)
@ -84,7 +89,7 @@ KEYMAPS(
( (
Key_Insert ,Key_Home ,Key_UpArrow ,Key_End ,Key_PageUp Key_Insert ,Key_Home ,Key_UpArrow ,Key_End ,Key_PageUp
,Key_Delete ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_PageDown ,Key_Delete ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_PageDown
,XXX ,Consumer_VolumeIncrement ,XXX ,XXX ,___ ,___ ,M(MACRO_VERSION_INFO) ,Consumer_VolumeIncrement ,XXX ,XXX ,___ ,___
,MoveToLayer(QWERTY) ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___ ,MoveToLayer(QWERTY) ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___
,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10 ,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10
@ -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. // the macro in EEPROM, it will keep working after a firmware update.
Layer.move(QWERTY); Layer.move(QWERTY);
break; break;
case MACRO_VERSION_INFO:
if (keyToggledOn(keyState)) {
Macros.type(PSTR("Keyboardio Atreus - Kaleidoscope "));
Macros.type(PSTR(BUILD_INFORMATION));
}
break;
default: default:
break; break;
} }

Loading…
Cancel
Save