Updated Atreus2 sketch based on Chrysalis Atreus sketch

pull/701/head
Jesse Vincent 5 years ago
parent 31fea28093
commit b86a10264f
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Atreus -- A very basic Kaleidoscope example for the Atreus * Atreus -- Chrysalis-enabled Sketch for the Atreus2
* Copyright (C) 2018 Keyboard.io, Inc * Copyright (C) 2018, 2019 Keyboard.io, Inc
* *
* 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
@ -18,13 +18,22 @@
*/ */
#include "Kaleidoscope.h" #include "Kaleidoscope.h"
#include "Kaleidoscope-EEPROM-Settings.h"
#include "Kaleidoscope-EEPROM-Keymap.h"
#include "Kaleidoscope-FocusSerial.h"
#include "Kaleidoscope-Macros.h" #include "Kaleidoscope-Macros.h"
#include "Kaleidoscope-MouseKeys.h"
#include "Kaleidoscope-OneShot.h"
#include "Kaleidoscope-Qukeys.h"
#include "Kaleidoscope-SpaceCadet.h"
#define MO(n) ShiftToLayer(n) #define MO(n) ShiftToLayer(n)
#define TG(n) LockLayer(n) #define TG(n) LockLayer(n)
enum { enum {
RESET LAYER_QWERTY
}; };
#define Key_Exclamation LSHIFT(Key_1) #define Key_Exclamation LSHIFT(Key_1)
@ -35,9 +44,15 @@ enum {
#define Key_Star LSHIFT(Key_8) #define Key_Star LSHIFT(Key_8)
#define Key_Plus LSHIFT(Key_Equals) #define Key_Plus LSHIFT(Key_Equals)
enum {
QWERTY,
NUMPAD,
NAV
};
/* *INDENT-OFF* */ /* *INDENT-OFF* */
KEYMAPS( KEYMAPS(
[0] = KEYMAP_STACKED [QWERTY] = KEYMAP_STACKED
( (
Key_Q ,Key_W ,Key_E ,Key_R ,Key_T Key_Q ,Key_W ,Key_E ,Key_R ,Key_T
,Key_A ,Key_S ,Key_D ,Key_F ,Key_G ,Key_A ,Key_S ,Key_D ,Key_F ,Key_G
@ -47,42 +62,54 @@ KEYMAPS(
,Key_Y ,Key_U ,Key_I ,Key_O ,Key_P ,Key_Y ,Key_U ,Key_I ,Key_O ,Key_P
,Key_H ,Key_J ,Key_K ,Key_L ,Key_Semicolon ,Key_H ,Key_J ,Key_K ,Key_L ,Key_Semicolon
,Key_Backslash,Key_N ,Key_M ,Key_Comma ,Key_Period ,Key_Slash ,Key_Backslash,Key_N ,Key_M ,Key_Comma ,Key_Period ,Key_Slash
,Key_LeftAlt ,Key_Space ,MO(1) ,Key_Minus ,Key_Quote ,Key_Enter ,Key_LeftAlt ,Key_Space ,MO(NUMPAD) ,Key_Minus ,Key_Quote ,Key_Enter
), ),
[1] = KEYMAP_STACKED [NUMPAD] = KEYMAP_STACKED
( (
Key_Exclamation ,Key_At ,Key_UpArrow ,Key_LeftCurlyBracket ,Key_RightCurlyBracket Key_Exclamation ,Key_At ,Key_UpArrow ,Key_LeftCurlyBracket ,Key_RightCurlyBracket
,Key_Hash ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_Dollar ,Key_Hash ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_Dollar
,Key_LeftBracket ,Key_RightBracket ,Key_LeftParen ,Key_RightParen ,Key_And ,XXX ,Key_LeftBracket ,Key_RightBracket ,Key_LeftParen ,Key_RightParen ,Key_And ,___
,TG(2) ,Key_Insert ,Key_LeftGui ,Key_LeftShift ,Key_Backspace ,Key_LeftControl ,TG(NAV) ,Key_Insert ,Key_LeftGui ,Key_LeftShift ,Key_Backspace ,Key_LeftControl
,Key_PageUp ,Key_7 ,Key_8 ,Key_9 ,Key_Star ,Key_PageUp ,Key_7 ,Key_8 ,Key_9 ,Key_Star
,Key_PageDown ,Key_4 ,Key_5 ,Key_6 ,Key_Plus ,Key_PageDown ,Key_4 ,Key_5 ,Key_6 ,Key_Plus
,XXX ,Key_Backtick ,Key_1 ,Key_2 ,Key_3 ,Key_Backslash ,___ ,Key_Backtick ,Key_1 ,Key_2 ,Key_3 ,Key_Backslash
,Key_LeftAlt ,Key_Space ,MO(1) ,Key_Period ,Key_0 ,Key_Equals ,Key_LeftAlt ,Key_Space ,___ ,Key_Period ,Key_0 ,Key_Equals
), ),
[2] = KEYMAP_STACKED [NAV] = KEYMAP_STACKED
( (
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(RESET) ,XXX ,XXX ,Consumer_VolumeIncrement ,XXX ,XXX ,___ ,___
,XXX ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___ ,XXX ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___
,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10 ,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10
,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11 ,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11
,XXX ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12 ,___ ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12
,___ ,___ ,___ ,Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause ,___ ,___ ,M(QWERTY) ,Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause
) )
) )
/* *INDENT-ON* */ /* *INDENT-ON* */
KALEIDOSCOPE_INIT_PLUGINS(Macros); KALEIDOSCOPE_INIT_PLUGINS(
EEPROMSettings,
EEPROMKeymap,
Focus,
FocusEEPROMCommand,
FocusSettingsCommand,
OneShot,
SpaceCadet,
MouseKeys,
Macros,
Qukeys
);
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
switch (macroIndex) { switch (macroIndex) {
case RESET: case QWERTY:
Layer.move(LAYER_QWERTY);
break; break;
default: default:
break; break;
@ -93,6 +120,8 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
void setup() { void setup() {
Kaleidoscope.setup(); Kaleidoscope.setup();
SpaceCadet.disable();
EEPROMKeymap.setup(5);
} }
void loop() { void loop() {

Loading…
Cancel
Save