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++ -*-
* Atreus -- A very basic Kaleidoscope example for the Atreus
* Copyright (C) 2018 Keyboard.io, Inc
* Atreus -- Chrysalis-enabled Sketch for the Atreus2
* Copyright (C) 2018, 2019 Keyboard.io, Inc
*
* 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
@ -18,13 +18,22 @@
*/
#include "Kaleidoscope.h"
#include "Kaleidoscope-EEPROM-Settings.h"
#include "Kaleidoscope-EEPROM-Keymap.h"
#include "Kaleidoscope-FocusSerial.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 TG(n) LockLayer(n)
enum {
RESET
LAYER_QWERTY
};
#define Key_Exclamation LSHIFT(Key_1)
@ -35,9 +44,15 @@ enum {
#define Key_Star LSHIFT(Key_8)
#define Key_Plus LSHIFT(Key_Equals)
enum {
QWERTY,
NUMPAD,
NAV
};
/* *INDENT-OFF* */
KEYMAPS(
[0] = KEYMAP_STACKED
[QWERTY] = KEYMAP_STACKED
(
Key_Q ,Key_W ,Key_E ,Key_R ,Key_T
,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_H ,Key_J ,Key_K ,Key_L ,Key_Semicolon
,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_Hash ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_Dollar
,Key_LeftBracket ,Key_RightBracket ,Key_LeftParen ,Key_RightParen ,Key_And ,XXX
,TG(2) ,Key_Insert ,Key_LeftGui ,Key_LeftShift ,Key_Backspace ,Key_LeftControl
,Key_LeftBracket ,Key_RightBracket ,Key_LeftParen ,Key_RightParen ,Key_And ,___
,TG(NAV) ,Key_Insert ,Key_LeftGui ,Key_LeftShift ,Key_Backspace ,Key_LeftControl
,Key_PageUp ,Key_7 ,Key_8 ,Key_9 ,Key_Star
,Key_PageDown ,Key_4 ,Key_5 ,Key_6 ,Key_Plus
,XXX ,Key_Backtick ,Key_1 ,Key_2 ,Key_3 ,Key_Backslash
,Key_LeftAlt ,Key_Space ,MO(1) ,Key_Period ,Key_0 ,Key_Equals
,___ ,Key_Backtick ,Key_1 ,Key_2 ,Key_3 ,Key_Backslash
,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_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 ,___ ,___ ,___ ,___
,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10
,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11
,XXX ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12
,___ ,___ ,___ ,Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause
,___ ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12
,___ ,___ ,M(QWERTY) ,Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause
)
)
/* *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) {
switch (macroIndex) {
case RESET:
case QWERTY:
Layer.move(LAYER_QWERTY);
break;
default:
break;
@ -93,6 +120,8 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
void setup() {
Kaleidoscope.setup();
SpaceCadet.disable();
EEPROMKeymap.setup(5);
}
void loop() {

Loading…
Cancel
Save