Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
437446ba8f | ||
|
|
8640b43214 | ||
|
|
09fc6cab34 | ||
|
|
7e8dc2e570 | ||
|
|
263536586d |
No files matched your search
+7
-43
@@ -1,46 +1,10 @@
|
|||||||
/* Copyright 2020 yfuku
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_bat43_rev1
|
||||||
|
#include "rev1.h"
|
||||||
|
#endif
|
||||||
|
#ifdef KEYBOARD_bat43_rev2
|
||||||
|
#include "rev2.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
/* This is a shortcut to help you visually see your layout.
|
|
||||||
*
|
|
||||||
* The first section contains all of the arguments representing the physical
|
|
||||||
* layout of the board and position of the keys.
|
|
||||||
*
|
|
||||||
* The second converts the arguments into a two-dimensional array which
|
|
||||||
* represents the switch matrix.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#define LAYOUT( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
|
||||||
k33, k34, k35, k70, k71, k72, \
|
|
||||||
k74, k75, k73, k31, k32 \
|
|
||||||
) { \
|
|
||||||
{ k00, k01, k02, k03, k04, k05 }, \
|
|
||||||
{ k10, k11, k12, k13, k14, k15 }, \
|
|
||||||
{ k20, k21, k22, k23, k24, k25 }, \
|
|
||||||
{ k30, k31, k32, k33, k34, k35 }, \
|
|
||||||
{ k40, k41, k42, k43, k44, k45 }, \
|
|
||||||
{ k50, k51, k52, k53, k54, k55 }, \
|
|
||||||
{ k60, k61, k62, k63, k64, k65 }, \
|
|
||||||
{ k70, k71, k72, k73, k74, k75 }, \
|
|
||||||
}
|
|
||||||
File renamed without changes.
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 yfuku
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "rev1.h"
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2020 yfuku
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
||||||
|
k33, k34, k35, k70, k71, k72, \
|
||||||
|
k74, k75, k73, k31, k32 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45 }, \
|
||||||
|
{ k50, k51, k52, k53, k54, k55 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65 }, \
|
||||||
|
{ k70, k71, k72, k73, k74, k75 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "bat43",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "yfuku",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5.1,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":1.43},
|
||||||
|
{"label":"k01", "x":1, "y":1.11},
|
||||||
|
{"label":"k02", "x":2, "y":0.38},
|
||||||
|
{"label":"k03", "x":3, "y":0},
|
||||||
|
{"label":"k04", "x":4, "y":0.05},
|
||||||
|
{"label":"k05", "x":5, "y":0.16},
|
||||||
|
|
||||||
|
{"label":"k40", "x":9, "y":0.16},
|
||||||
|
{"label":"k41", "x":10, "y":0.05},
|
||||||
|
{"label":"k42", "x":11, "y":0},
|
||||||
|
{"label":"k43", "x":12, "y":0.38},
|
||||||
|
{"label":"k44", "x":13, "y":1.11},
|
||||||
|
{"label":"k45", "x":14, "y":1.43},
|
||||||
|
|
||||||
|
{"label":"k10", "x":0, "y":2.43},
|
||||||
|
{"label":"k11", "x":1, "y":2.11},
|
||||||
|
{"label":"k12", "x":2, "y":1.38},
|
||||||
|
{"label":"k13", "x":3, "y":1},
|
||||||
|
{"label":"k14", "x":4, "y":1.05},
|
||||||
|
{"label":"k15", "x":5, "y":1.16},
|
||||||
|
|
||||||
|
{"label":"k30", "x":7, "y":1.16},
|
||||||
|
|
||||||
|
{"label":"k50", "x":9, "y":1.16},
|
||||||
|
{"label":"k51", "x":10, "y":1.05},
|
||||||
|
{"label":"k52", "x":11, "y":1},
|
||||||
|
{"label":"k53", "x":12, "y":1.38},
|
||||||
|
{"label":"k54", "x":13, "y":2.11},
|
||||||
|
{"label":"k55", "x":14, "y":2.43},
|
||||||
|
|
||||||
|
{"label":"k20", "x":0, "y":3.43},
|
||||||
|
{"label":"k21", "x":1, "y":3.11},
|
||||||
|
{"label":"k22", "x":2, "y":2.38},
|
||||||
|
{"label":"k23", "x":3, "y":2},
|
||||||
|
{"label":"k24", "x":4, "y":2.05},
|
||||||
|
{"label":"k25", "x":5, "y":2.16},
|
||||||
|
|
||||||
|
{"label":"k60", "x":9, "y":2.16},
|
||||||
|
{"label":"k61", "x":10, "y":2.05},
|
||||||
|
{"label":"k62", "x":11, "y":2},
|
||||||
|
{"label":"k63", "x":12, "y":2.38},
|
||||||
|
{"label":"k64", "x":13, "y":3.11},
|
||||||
|
{"label":"k65", "x":14, "y":3.43},
|
||||||
|
|
||||||
|
{"label":"k33", "x":4, "y":3.3},
|
||||||
|
{"label":"k34", "x":5, "y":3.3},
|
||||||
|
{"label":"k35", "x":6, "y":3.3},
|
||||||
|
|
||||||
|
{"label":"k70", "x":8, "y":3.3},
|
||||||
|
{"label":"k71", "x":9, "y":3.3},
|
||||||
|
{"label":"k72", "x":10, "y":3.3},
|
||||||
|
|
||||||
|
{"label":"k75", "x":5.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
{"label":"k74", "x":6.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
|
||||||
|
{"label":"k73", "x":8.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
{"label":"k31", "x":9.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
{"label":"k32", "x":10.1, "y":4.3, "w":0.8, "h":0.8}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 yfuku
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "rev2.h"
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2020 yfuku
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
||||||
|
k33, k34, k35, k70, k71, k72, \
|
||||||
|
k75, k74, k73, k31, k32 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45 }, \
|
||||||
|
{ k50, k51, k52, k53, k54, k55 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65 }, \
|
||||||
|
{ k70, k71, k72, k73, k74, k75 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -30,3 +30,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
|
||||||
|
DEFAULT_FOLDER = bat43/rev2
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 keebzdotnet
|
||||||
|
|
||||||
|
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
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x53FC
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER keebzdotnet
|
||||||
|
#define PRODUCT wazowski 23-19
|
||||||
|
#define DESCRIPTION A modern keyboard from an animated monster movie keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 3
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6 }
|
||||||
|
#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
// #define RGB_DI_PIN E2
|
||||||
|
// #ifdef RGB_DI_PIN
|
||||||
|
// #define RGBLED_NUM 16
|
||||||
|
// #define RGBLIGHT_HUE_STEP 8
|
||||||
|
// #define RGBLIGHT_SAT_STEP 8
|
||||||
|
// #define RGBLIGHT_VAL_STEP 8
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
// #define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "wazowski",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "keebzdotnet",
|
||||||
|
"width": 9,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":3},
|
||||||
|
{"label":"k01", "x":1, "y":0},
|
||||||
|
{"label":"k02", "x":1, "y":4},
|
||||||
|
{"label":"k03", "x":2, "y":3},
|
||||||
|
{"label":"k04", "x":3, "y":2},
|
||||||
|
{"label":"k05", "x":3, "y":4},
|
||||||
|
{"label":"k06", "x":4, "y":2},
|
||||||
|
{"label":"k07", "x":4, "y":3},
|
||||||
|
{"label":"k08", "x":5, "y":2},
|
||||||
|
{"label":"k09", "x":5, "y":3},
|
||||||
|
{"label":"k10", "x":6, "y":2},
|
||||||
|
{"label":"k11", "x":7, "y":1},
|
||||||
|
{"label":"k12", "x":7, "y":3},
|
||||||
|
{"label":"k13", "x":8, "y":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 keebzdotnet
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BASE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base */
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_A, KC_B, KC_C,KC_D, KC_E,
|
||||||
|
KC_F, KC_G, KC_H, KC_I, KC_J,
|
||||||
|
KC_K, KC_L, KC_M, KC_N
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for wazowski
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# wazowski 23-19
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
There once was a r/mech post that showed a horrible keyboard from Monster Inc. This is a modernized version of it
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [keebzdotnet](https://github.com/keebzdotnet)
|
||||||
|
* Hardware Supported: Wazowski 23-19 PCB
|
||||||
|
* Hardware Availability: https://www.keebz.net/shop/wazoski-pcb
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make keebzdotnet/wazowski:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 keebzdotnet
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "wazowski.h"
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/* Copyright 2020 keebzdotnet
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, \
|
||||||
|
k05, k06, k07, k08, k09, \
|
||||||
|
k10, k11, k12, k13 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04 }, \
|
||||||
|
{ k05, k06, k07, k08, k09 }, \
|
||||||
|
{ k10, k11, KC_NO, k12, k13 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* Copyright 2019 Thomas Baart <[email protected]>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
#define OLED_DISPLAY_128X64
|
||||||
|
#define OLED_TIMEOUT 300000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
|
||||||
|
#define SPLIT_USB_DETECT
|
||||||
|
#define NO_USB_STARTUP_CHECK
|
||||||
|
#define SPLIT_USB_TIMEOUT 1000
|
||||||
|
|
||||||
|
#define MASTER_RIGHT
|
||||||
|
#define ENCODER_DIRECTION_FLIP
|
||||||
|
|
||||||
|
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#define NO_ACTION_ONESHOT
|
||||||
|
#define OLED_FONT_END 127
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#define RGBLIGHT_LED_MAP {0,1,2,9,8,7,4,3,5,6,19,18,17,10,11,12,15,16,14,13} // Orients Kyria LEDs to a circle around both halves.
|
||||||
|
//#define RBGLIGHT_LED_MAP {9,8,6,7,5,3,2,4,1,0,10,12,13,11,14,16,17,15,18,19} // Orients Kyria LEDs for a left half-right half columnar progression.
|
||||||
|
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
//#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,369 @@
|
|||||||
|
/* Copyright 2019 Thomas Baart <[email protected]>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include <stdio.h>
|
||||||
|
bool is_alt_tab_active = false;
|
||||||
|
uint16_t alt_tab_timer = 0;
|
||||||
|
|
||||||
|
char wpm_str[10];
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_QWERTY,
|
||||||
|
_2WERTY, //pronounced "twerty," obviously
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
* Base Layer: QWERTY
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | BKSP |
|
||||||
|
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||||
|
* |Tab | A | S | D | F | G | | H | J | K | L | ; : | ' " |
|
||||||
|
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
|
||||||
|
* | CTRL | Z | X | C | V | B |Enter |Ctrl | |Ctrl |(2u) | N | M | , < | . > | / ? | - _ |
|
||||||
|
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
|
||||||
|
* | TG(1)| Alt | Win | Shift| Back | | Enter| Space| Win | Alt |TG(3) |
|
||||||
|
* | | | | Lower| space| | Lower| Raise| | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_LCTL, KC_RCTL, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
|
||||||
|
TG(1), KC_LALT, KC_LGUI, KC_LSFT, KC_BSPC, LT(3, KC_ENT), LT(2, KC_SPC), KC_RGUI, KC_RALT, TG(2)
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
* This layer exists to change encoder functions.
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | | | |
|
||||||
|
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
*/
|
||||||
|
[_2WERTY] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
* Lower Layer: numpad and arrow
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | | | 7 | 8 | 9 | 0 | | PGUP | | UP | | | Del
|
||||||
|
|
|
||||||
|
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||||
|
* | CAPS | | 4 | 5 | 6 | Tab | | PGDN | Left | Down | Right| | |
|
||||||
|
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
|
||||||
|
* | | | 1 | 2 | 3 | Ent | | | | | | | LBRC | RBRC | | |\ | += |
|
||||||
|
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
|
||||||
|
* | | Tab | Ent | | | | | | | | |
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
_______, _______, KC_7, KC_8, KC_9, KC_0, KC_PGUP, _______, KC_UP, _______, _______, KC_DEL,
|
||||||
|
KC_CAPS, _______, KC_4, KC_5, KC_6, KC_TAB, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
|
||||||
|
KC_LSFT, KC_0, KC_1, KC_2, KC_3, KC_ENT, KC_TRNS, KC_TRNS, MO(4), _______, KC_LBRC, KC_RBRC, _______, _______, KC_BSLS, KC_EQL,
|
||||||
|
KC_TRNS, KC_TAB, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, _______
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
* Raise Layer: F keys and media
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | | | | | | | | F9 | F10 | F11 | F12 | | |
|
||||||
|
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||||
|
* | | | Prev | Play | Next | VolUp| | F5 | F6 | F7 | F8 | | |
|
||||||
|
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | Mute | VolDn| | | | | | F1 | F2 | F3 | F4 | | |
|
||||||
|
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||||
|
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
* Adjust Layer: Function keys, RGB
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
|
||||||
|
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||||
|
* | | VAI | SAI | HUI | SPI | MOD | | | | | F11 | F12 | |
|
||||||
|
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
|
||||||
|
* | | VID | SAD | HUD | SPD | RMOD | | | | | | | | | | | |
|
||||||
|
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
|
RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RGB_SPI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______,
|
||||||
|
_______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_SPD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
// /*
|
||||||
|
// * Layer template
|
||||||
|
// *
|
||||||
|
// * ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
// * | | | | | | | | | | | | | |
|
||||||
|
// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||||
|
// * | | | | | | | | | | | | | |
|
||||||
|
// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
|
||||||
|
// * | | | | | | | | | | | | | | | | | |
|
||||||
|
// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
|
||||||
|
// * | | | | | | | | | | | |
|
||||||
|
// * | | | | | | | | | | | |
|
||||||
|
// * `----------------------------------' `----------------------------------'
|
||||||
|
// */
|
||||||
|
// [_LAYERINDEX] = LAYOUT(
|
||||||
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
// ),
|
||||||
|
};
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
return OLED_ROTATION_180;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void render_status(void) {
|
||||||
|
// Host Keyboard Layer Status
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_P(PSTR("QWERTY"), false);
|
||||||
|
break;
|
||||||
|
case _2WERTY:
|
||||||
|
oled_write_P(PSTR("2WERTY"), false);
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
oled_write_P(PSTR("Numpad"), false);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
oled_write_P(PSTR("F Keys"), false);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
oled_write_P(PSTR("RGB "), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_P(PSTR("Undefined"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Host Keyboard LED Status
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// WPM-responsive animation stuff here
|
||||||
|
#define IDLE_FRAMES 5
|
||||||
|
#define IDLE_SPEED 40 // below this wpm value your animation will idle
|
||||||
|
|
||||||
|
// #define PREP_FRAMES 1 // uncomment if >1
|
||||||
|
|
||||||
|
#define TAP_FRAMES 2
|
||||||
|
#define TAP_SPEED 60 // above this wpm value typing animation to triggere
|
||||||
|
|
||||||
|
#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
|
||||||
|
// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
|
||||||
|
#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024
|
||||||
|
|
||||||
|
uint32_t anim_timer = 0;
|
||||||
|
uint32_t anim_sleep = 0;
|
||||||
|
uint8_t current_idle_frame = 0;
|
||||||
|
// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1
|
||||||
|
uint8_t current_tap_frame = 0;
|
||||||
|
|
||||||
|
// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach.
|
||||||
|
static void render_anim(void) {
|
||||||
|
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 8, 4, 2, 2, 4, 24, 96,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,194, 1, 1, 2, 2, 4, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 0,129,130,130,132, 8, 16, 32, 64,128, 0, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 25, 6, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 27, 3, 0, 64,160, 34, 36, 20, 18, 18, 18, 11, 8, 8, 8, 8, 5, 5, 9, 9, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 4, 2, 2, 2, 4, 56, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,226, 1, 1, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
}
|
||||||
|
};
|
||||||
|
static const char PROGMEM prep[][ANIM_SIZE] = {
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132,195,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
}
|
||||||
|
};
|
||||||
|
static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = {
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0,248,248,248,248, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1, 1, 2, 4, 8, 16, 32, 67,135, 7, 1, 0,184,188,190,159, 95, 95, 79, 76, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132, 67,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 61,124,252,252,252,252,252, 60, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 63, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,
|
||||||
|
0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0,
|
||||||
|
0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0,
|
||||||
|
0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3,122,122,121,121,121,121, 57, 49, 2, 2, 4, 4, 8, 8, 8,136,136,135,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0,
|
||||||
|
32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,120,124,254,255, 63, 7, 0, 0, 0, 0,255,255,127,127, 63, 62, 28, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
//assumes 1 frame prep stage
|
||||||
|
void animation_phase(void) {
|
||||||
|
if(get_current_wpm() <=IDLE_SPEED){
|
||||||
|
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
|
||||||
|
oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE);
|
||||||
|
}
|
||||||
|
if(get_current_wpm() >IDLE_SPEED && get_current_wpm() <TAP_SPEED){
|
||||||
|
// oled_write_raw_P(prep[abs((PREP_FRAMES-1)-current_prep_frame)], ANIM_SIZE); // uncomment if IDLE_FRAMES >1
|
||||||
|
oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1
|
||||||
|
}
|
||||||
|
if(get_current_wpm() >=TAP_SPEED){
|
||||||
|
current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES;
|
||||||
|
oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(get_current_wpm() != 000) {
|
||||||
|
oled_on(); // not essential but turns on animation OLED with any alpha keypress
|
||||||
|
if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||||
|
anim_timer = timer_read32();
|
||||||
|
animation_phase();
|
||||||
|
}
|
||||||
|
anim_sleep = timer_read32();
|
||||||
|
} else {
|
||||||
|
if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) {
|
||||||
|
oled_off();
|
||||||
|
} else {
|
||||||
|
if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||||
|
anim_timer = timer_read32();
|
||||||
|
animation_phase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// static void render_skull(void) { // Helen Tseong (http://shewolfe.co/), the original artist behind the skull, sadly only allowing use of the skull for my personal use. Her (excellent) works are copyright her, and I claim no ownership. Reach out to her for permission!
|
||||||
|
// static const char PROGMEM skull[] = {
|
||||||
|
// };
|
||||||
|
// oled_write_raw_P(skull, 801);
|
||||||
|
// }
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
//render_skull();
|
||||||
|
//oled_set_cursor(7,6);
|
||||||
|
render_status();
|
||||||
|
// Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||||
|
} else {
|
||||||
|
render_anim();
|
||||||
|
oled_set_cursor(0,6);
|
||||||
|
sprintf(wpm_str, " WPM: %03d", get_current_wpm());
|
||||||
|
oled_write(wpm_str, false);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENCODER_ENABLE
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
switch(biton32(layer_state)){
|
||||||
|
case 1:
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(C(KC_TAB));
|
||||||
|
} else {
|
||||||
|
tap_code16(S(C(KC_TAB)));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (clockwise) {
|
||||||
|
if (!is_alt_tab_active) {
|
||||||
|
is_alt_tab_active = true;
|
||||||
|
register_code(KC_LALT);
|
||||||
|
}
|
||||||
|
alt_tab_timer = timer_read();
|
||||||
|
tap_code16(KC_TAB);
|
||||||
|
} else {
|
||||||
|
tap_code16(S(KC_TAB));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
if (is_alt_tab_active) {
|
||||||
|
if (timer_elapsed(alt_tab_timer) > 1250) {
|
||||||
|
unregister_code(KC_LALT);
|
||||||
|
is_alt_tab_active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
|
||||||
|
ENCODER_ENABLE = yes # Enables the use of one or more encoders
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
RGBLIGHT_ANIMATIONS = yes
|
||||||
|
WPM_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
STENO_ENABLE = no
|
||||||
|
BOOTMAGIC_ENABLE =no
|
||||||
|
TERMINAL_ENABLE = no
|
||||||
|
GRAVE_ESC_ENABLE = no
|
||||||
|
MAGIC_ENABLE = no
|
||||||
|
SPACE_CADET_ENABLE = no
|
||||||
|
KEY_LOCK_ENABLE = no
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
VELOCIKEY_ENABLE = no
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/* Copyright 2020 elmo-space<[email protected]>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/*enable layers*/
|
||||||
|
#undef NO_ACTION_LAYER
|
||||||
|
|
||||||
|
/* increase tap duration (spotify doesn't like very short taps)*/
|
||||||
|
#define TAP_CODE_DELAY 100
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
/* Copyright 2020 elmo-space<[email protected]>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "rgblite.h"
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_FUNC,
|
||||||
|
};
|
||||||
|
|
||||||
|
// set your keycodes here
|
||||||
|
#define layer1_left KC_PAUS
|
||||||
|
#define layer1_right KC_MPLY
|
||||||
|
#define layer2_left KC_MPRV
|
||||||
|
#define layer2_right KC_MNXT
|
||||||
|
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
LEFT1 = SAFE_RANGE,
|
||||||
|
RIGHT1,
|
||||||
|
LEFT2,
|
||||||
|
RIGHT2
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
LEFT1, RIGHT1
|
||||||
|
),
|
||||||
|
[_FUNC] = LAYOUT(
|
||||||
|
LEFT2, RIGHT2
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
static bool key1_down = false;
|
||||||
|
static bool key2_down = false;
|
||||||
|
static char layer_switched = 0; // this prevents the individual keys getting triggered after a layerchange
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{
|
||||||
|
switch (keycode)
|
||||||
|
{
|
||||||
|
case LEFT1:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
if (key2_down)
|
||||||
|
{
|
||||||
|
layer_on(1);
|
||||||
|
layer_switched = 2;
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
key1_down = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (layer_switched > 0) {
|
||||||
|
--layer_switched;
|
||||||
|
key1_down = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tap_code(layer1_left);
|
||||||
|
key1_down = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RIGHT1:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
if (key1_down)
|
||||||
|
{
|
||||||
|
layer_on(1);
|
||||||
|
layer_switched = 2;
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
key2_down = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (layer_switched > 0) {
|
||||||
|
--layer_switched;
|
||||||
|
key2_down = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tap_code(layer1_right);
|
||||||
|
key2_down = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LEFT2:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
if (key2_down)
|
||||||
|
{
|
||||||
|
layer_off(1);
|
||||||
|
layer_switched = 2;
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
key1_down = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (layer_switched > 0) {
|
||||||
|
--layer_switched;
|
||||||
|
key1_down = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tap_code(layer2_left);
|
||||||
|
key1_down = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RIGHT2:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
if (key1_down)
|
||||||
|
{
|
||||||
|
layer_off(1);
|
||||||
|
layer_switched = 2;
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
key2_down = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (layer_switched > 0) {
|
||||||
|
--layer_switched;
|
||||||
|
key2_down = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tap_code(layer2_right);
|
||||||
|
key2_down = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// layer colors
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
switch (get_highest_layer(state)) {
|
||||||
|
case _FUNC:
|
||||||
|
rgblight_setrgb_red();
|
||||||
|
break;
|
||||||
|
default: // for any other layers, or the default layer
|
||||||
|
rgblight_setrgb_green();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
// default color
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
rgblight_setrgb_green();
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "ws2812.h"
|
||||||
|
#include "rgblight_list.h"
|
||||||
|
|
||||||
|
static inline void rgblight_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) {
|
||||||
|
LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}};
|
||||||
|
ws2812_setleds(leds, RGBLED_NUM);
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
SRC += ws2812.c
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
@@ -604,6 +604,7 @@ void process_action(keyrecord_t *record, action_t action) {
|
|||||||
swap_hands = false;
|
swap_hands = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
# ifndef NO_ACTION_ONESHOT
|
||||||
case OP_SH_ONESHOT:
|
case OP_SH_ONESHOT:
|
||||||
if (event.pressed) {
|
if (event.pressed) {
|
||||||
set_oneshot_swaphands();
|
set_oneshot_swaphands();
|
||||||
@@ -611,6 +612,7 @@ void process_action(keyrecord_t *record, action_t action) {
|
|||||||
release_oneshot_swaphands();
|
release_oneshot_swaphands();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifndef NO_ACTION_TAPPING
|
# ifndef NO_ACTION_TAPPING
|
||||||
case OP_SH_TAP_TOGGLE:
|
case OP_SH_TAP_TOGGLE:
|
||||||
@@ -701,9 +703,11 @@ void process_action(keyrecord_t *record, action_t action) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SWAP_HANDS_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
|
# ifndef NO_ACTION_ONESHOT
|
||||||
if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) {
|
if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) {
|
||||||
use_oneshot_swaphands();
|
use_oneshot_swaphands();
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_ACTION_ONESHOT
|
#ifndef NO_ACTION_ONESHOT
|
||||||
|
|||||||
Reference in new issue
Block a user