summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/40percentclub/nano/keymaps/drashna/keymap.c10
-rw-r--r--[-rwxr-xr-x]keyboards/c39/keymaps/drashna/config.h9
-rwxr-xr-xkeyboards/c39/keymaps/drashna/keymap.c132
-rw-r--r--keyboards/c39/keymaps/drashna/rules.mk4
-rw-r--r--keyboards/crkbd/keymaps/drashna/glcdfont.c9
-rw-r--r--keyboards/crkbd/keymaps/drashna/keymap.c49
-rw-r--r--keyboards/gergo/keymaps/drashna/keymap.c18
-rw-r--r--keyboards/keebio/iris/keymaps/drashna/config.h3
-rw-r--r--keyboards/keebio/iris/keymaps/drashna/keymap.c14
-rw-r--r--keyboards/keebio/viterbi/keymaps/drashna/config.h31
-rw-r--r--keyboards/keebio/viterbi/keymaps/drashna/keymap.c50
-rw-r--r--keyboards/kyria/keymaps/drashna/config.h38
-rw-r--r--keyboards/kyria/keymaps/drashna/keymap.c372
-rw-r--r--keyboards/kyria/keymaps/drashna/rules.mk22
-rw-r--r--keyboards/orthodox/keymaps/drashna/config.h45
-rw-r--r--keyboards/orthodox/keymaps/drashna/keymap.c39
16 files changed, 654 insertions, 191 deletions
diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c
index 6c5b974572..668178967b 100644
--- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c
+++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c
@@ -1,12 +1,11 @@
-#include QMK_KEYBOARD_H
#include "drashna.h"
#include "analog.c"
#include "pointing_device.h"
#include "pincontrol.h"
-
#define KC_X0 LT(_FN, KC_ESC)
+// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
KC_VOLU, KC_MPLY, KC_MPRV, RESET,
@@ -14,6 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
+// clang-format on
// Joystick
// Set Pins
@@ -39,7 +39,7 @@ int16_t xOrigin, yOrigin;
uint16_t lastCursor = 0;
int16_t axisCoordinate(uint8_t pin, uint16_t origin) {
- int8_t direction;
+ int8_t direction;
int16_t distanceFromOrigin;
int16_t range;
@@ -57,8 +57,8 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) {
direction = 1;
}
- float percent = (float)distanceFromOrigin / range;
- int16_t coordinate = (int16_t)(percent * 100);
+ float percent = (float)distanceFromOrigin / range;
+ int16_t coordinate = (int16_t)(percent * 100);
if (coordinate < 0) {
return 0;
} else if (coordinate > 100) {
diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h
index 361f68a78e..5d53fe54bb 100755..100644
--- a/keyboards/c39/keymaps/drashna/config.h
+++ b/keyboards/c39/keymaps/drashna/config.h
@@ -2,6 +2,11 @@
// place overrides here
#undef MATRIX_COL_PINS
-#define MATRIX_COL_PINS { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 }
+#define MATRIX_COL_PINS \
+ { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 }
#undef MATRIX_ROW_PINS
-#define MATRIX_ROW_PINS { B7, B1, B0 }
+#define MATRIX_ROW_PINS \
+ { B7, B1, B0 }
+
+#define RGB_DI_PIN B10
+#define RGBLED_NUM 15
diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c
index 9de75190d0..882938138f 100755
--- a/keyboards/c39/keymaps/drashna/keymap.c
+++ b/keyboards/c39/keymaps/drashna/keymap.c
@@ -1,45 +1,97 @@
-#include QMK_KEYBOARD_H
+#include "drashna.h"
-// Each layer gets a name for readability, which is then used in the keymap matrix below.
-// The underscores don't mean anything - you can have a layer called STUFF or any other name.
-// Layer names don't all need to be of the same length, obviously, and you can also skip them
-// entirely and just use numbers.
-#define _QWERTY 0
-#define _FN1 1
-
-// Defines for task manager and such
-#define CALTDEL LCTL(LALT(KC_DEL))
-#define TSKMGR LCTL(LSFT(KC_ESC))
+/*
+ * The `LAYOUT_base` macro is a template to allow the use of identical
+ * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
+ * that there is no need to set them up for each layout, and modify all of
+ * them if I want to change them. This helps to keep consistency and ease
+ * of use. K## is a placeholder to pass through the individual keycodes
+ */
+// clang-format off
+#define LAYOUT_base( \
+ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
+ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
+ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
+ ) \
+ LAYOUT_wrapper( \
+ KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \
+ ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
+ KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \
+ )
+#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* Qwerty
- * ,----------------------------------------------------------------------------. ,-------------.
- * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 |
- * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
- * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 |
- * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
- * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 |
- * `----------------------------------------------------------------------------' `-------------'
- */
-[_QWERTY] = LAYOUT(
- KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2,
- KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4,
- KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6
-),
-
-/* FN1
- * ,----------------------------------------------------------------------------. ,-------------.
- * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 |
- * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
- * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 |
- * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
- * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 |
- * `----------------------------------------------------------------------------' `-------------'
- */
-[_FN1] = LAYOUT(
- KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2,
- KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4,
- KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6
-),
+ [_QWERTY] = LAYOUT_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
+
+ [_COLEMAK] = LAYOUT_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
+
+ [_DVORAK] = LAYOUT_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
+
+ [_WORKMAN] = LAYOUT_base_wrapper(
+ _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
+ _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
+ _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
+ ),
+
+ [_NORMAN] = LAYOUT_base_wrapper(
+ _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
+ _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
+ _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
+ ),
+
+ [_MALTRON] = LAYOUT_base_wrapper(
+ _________________MALTRON_L1________________, _________________MALTRON_R1________________,
+ _________________MALTRON_L2________________, _________________MALTRON_R2________________,
+ _________________MALTRON_L3________________, _________________MALTRON_R3________________
+ ),
+
+ [_EUCALYN] = LAYOUT_base_wrapper(
+ _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
+ _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
+ _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
+ ),
+
+ [_CARPLAX] = LAYOUT_base_wrapper(
+ _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
+ _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
+ _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
+ ),
+
+ [_MODS] = LAYOUT_wrapper(
+ _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______,
+ _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______,
+ KC_LSFT, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______
+ ),
+
+ [_LOWER] = LAYOUT_wrapper(
+ KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC,
+ KC_DEL, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE,
+ _______, _________________LOWER_L3__________________, _______, _________________LOWER_R3__________________, _______
+ ),
+
+ [_RAISE] = LAYOUT_wrapper(
+ KC_GRV, _________________RAISE_L1__________________, _______, _________________RAISE_R1__________________, KC_BSPC,
+ KC_DEL, _________________RAISE_L2__________________, _______, _________________RAISE_R2__________________, KC_BSLS,
+ _______, _________________RAISE_L3__________________, _______, _________________RAISE_R3__________________, _______
+ ),
+
+ [_ADJUST] = LAYOUT_wrapper(
+ KC_MAKE, _________________ADJUST_L1_________________, KC_NUKE, _________________ADJUST_R1_________________, KC_RST,
+ VRSN, _________________ADJUST_L2_________________, MG_NKRO, _________________ADJUST_R2_________________, EEP_RST,
+ TG_MODS, _________________ADJUST_L3_________________, KC_RGB_T,_________________ADJUST_R3_________________, RGB_IDL
+ )
};
+// clang-format on
diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk
index ae0cc9efee..d216f6abe6 100644
--- a/keyboards/c39/keymaps/drashna/rules.mk
+++ b/keyboards/c39/keymaps/drashna/rules.mk
@@ -15,4 +15,6 @@ MIDI_ENABLE = no # MIDI controls
UNICODE_ENABLE = yes # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = yes # Audio output on port C6
-RGBLIGHT_ENABLE = no # RGB Enable / Disable
+RGBLIGHT_ENABLE = yes # RGB Enable / Disable
+
+RGBLIGHT_STARTUP_ANIMATION = yes
diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c
index 998b5c408a..2bfc3fac6d 100644
--- a/keyboards/crkbd/keymaps/drashna/glcdfont.c
+++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c
@@ -1,17 +1,18 @@
#pragma once
#ifdef __AVR__
- #include <avr/io.h>
- #include <avr/pgmspace.h>
+# include <avr/io.h>
+# include <avr/pgmspace.h>
#elif defined(ESP8266)
- #include <pgmspace.h>
+# include <pgmspace.h>
#else
- #define PROGMEM
+# define PROGMEM
#endif
// Corne 8x6 font with QMK Firmware Logo
// Online editor: https://helixfonteditor.netlify.com/
+// clang-format off
const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c
index cd84f0d919..9a1beeb74b 100644
--- a/keyboards/crkbd/keymaps/drashna/keymap.c
+++ b/keyboards/crkbd/keymaps/drashna/keymap.c
@@ -1,17 +1,17 @@
-#include QMK_KEYBOARD_H
#include "drashna.h"
-extern keymap_config_t keymap_config;
-extern uint8_t is_master;
+extern uint8_t is_master;
#ifdef RGBLIGHT_ENABLE
// Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif
#ifdef OLED_DRIVER_ENABLE
-static uint32_t oled_timer = 0;
-static char keylog_str[6] = {};
-static uint16_t log_timer = 0;
+# define KEYLOGGER_LENGTH 5
+static uint32_t oled_timer = 0;
+static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
+static uint16_t log_timer = 0;
+// clang-format off
static const char PROGMEM code_to_name[0xFF] = {
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
@@ -37,7 +37,14 @@ void add_keylog(uint16_t keycode);
enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
-// clang-format off
+/*
+ * The `LAYOUT_crkbd_base` macro is a template to allow the use of identical
+ * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
+ * that there is no need to set them up for each layout, and modify all of
+ * them if I want to change them. This helps to keep consistency and ease
+ * of use. K## is a placeholder to pass through the individual keycodes
+ */
+
#define LAYOUT_crkbd_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
@@ -155,7 +162,7 @@ void add_keylog(uint16_t keycode) {
keycode = 0;
}
- for (uint8_t i = 4; i > 0; --i) {
+ for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
keylog_str[i] = keylog_str[i - 1];
}
@@ -168,7 +175,7 @@ void add_keylog(uint16_t keycode) {
void update_log(void) {
if (timer_elapsed(log_timer) > 750) {
- //add_keylog(0);
+ // add_keylog(0);
}
}
@@ -179,7 +186,7 @@ void render_keylogger_status(void) {
void render_default_layer_state(void) {
oled_write_P(PSTR("Lyout"), false);
- switch (biton32(default_layer_state)) {
+ switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
oled_write_P(PSTR(" QRTY"), false);
break;
@@ -268,7 +275,7 @@ void render_status_secondary(void) {
/* Show Keyboard Layout */
render_default_layer_state();
render_layer_state();
- render_mod_status(get_mods()|get_oneshot_mods());
+ render_mod_status(get_mods() | get_oneshot_mods());
render_keylogger_status();
}
@@ -278,9 +285,11 @@ void oled_task_user(void) {
oled_off();
return;
}
-#ifndef SPLIT_KEYBOARD
- else { oled_on(); }
-#endif
+# ifndef SPLIT_KEYBOARD
+ else {
+ oled_on();
+ }
+# endif
update_log();
if (is_master) {
@@ -303,16 +312,12 @@ uint16_t get_tapping_term(uint16_t keycode) {
#ifdef RGB_MATRIX_ENABLE
-void suspend_power_down_keymap(void) {
- rgb_matrix_set_suspend_state(true);
-}
+void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); }
-void suspend_wakeup_init_keymap(void) {
- rgb_matrix_set_suspend_state(false);
-}
+void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); }
void check_default_layer(uint8_t mode, uint8_t type) {
- switch (biton32(default_layer_state)) {
+ switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type);
break;
@@ -351,7 +356,7 @@ void rgb_matrix_indicators_user(void) {
rgb_matrix_config.enable
# endif
) {
- switch (biton32(layer_state)) {
+ switch (get_highest_layer(layer_state)) {
case _GAMEPAD:
rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
break;
diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c
index edc5a9e997..d1e6224060 100644
--- a/keyboards/gergo/keymaps/drashna/keymap.c
+++ b/keyboards/gergo/keymaps/drashna/keymap.c
@@ -1,14 +1,12 @@
-/* Good on you for modifying your layout! if you don't have
- * time to read the QMK docs, a list of keycodes can be found at
- *
- * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
- *
- * There's also a template for adding new layers at the bottom of this file!
- */
-
-#include QMK_KEYBOARD_H
#include "drashna.h"
+/*
+ * The `LAYOUT_gergo_base` macro is a template to allow the use of identical
+ * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
+ * that there is no need to set them up for each layout, and modify all of
+ * them if I want to change them. This helps to keep consistency and ease
+ * of use. K## is a placeholder to pass through the individual keycodes
+ */
// clang-format off
#define LAYOUT_gergo_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
@@ -17,7 +15,7 @@
) \
LAYOUT_gergo_wrapper( \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
- KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
+ LALT_T(KC_TAB), K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \
)
diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h
index 6fff5d72c6..25678bd67d 100644
--- a/keyboards/keebio/iris/keymaps/drashna/config.h
+++ b/keyboards/keebio/iris/keymaps/drashna/config.h
@@ -32,7 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# undef RGBLED_NUM
# define RGBLED_NUM 18 // Number of LEDs
# undef RGBLED_SPLIT
-# define RGBLED_SPLIT { 9, 9 }
+# define RGBLED_SPLIT \
+ { 9, 9 }
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c
index de19f7ca08..edfcd23e79 100644
--- a/keyboards/keebio/iris/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c
@@ -1,7 +1,13 @@
-
-#include QMK_KEYBOARD_H
#include "drashna.h"
+/*
+ * The `LAYOUT_iris_base` macro is a template to allow the use of identical
+ * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
+ * that there is no need to set them up for each layout, and modify all of
+ * them if I want to change them. This helps to keep consistency and ease
+ * of use. K## is a placeholder to pass through the individual keycodes
+ */
+
// clang-format off
#define LAYOUT_iris_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
@@ -10,8 +16,8 @@
) \
LAYOUT_wrapper( \
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
- KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
- KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
+ LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
+ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \
)
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h
index 201c02e419..40a5bbd0e8 100644
--- a/keyboards/keebio/viterbi/keymaps/drashna/config.h
+++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h
@@ -21,27 +21,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 5
#ifdef RGBLIGHT_ENABLE
-# undef RGBLED_NUM
-# define RGBLED_NUM 16
-
-# define RGBLIGHT_HUE_STEP 8
-# define RGBLIGHT_SAT_STEP 8
-# define RGBLIGHT_VAL_STEP 8
-# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
-# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
-#endif // RGBLIGHT_ENABLE
-
-
+# undef RGBLED_NUM
+# define RGBLED_NUM 16
+# define RGBLIGHT_HUE_STEP 8
+# define RGBLIGHT_SAT_STEP 8
+# define RGBLIGHT_VAL_STEP 8
+# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
+# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
+#endif // RGBLIGHT_ENABLE
#undef PRODUCT
-#define PRODUCT Drashnas Viterbi Macro Pad
+#define PRODUCT Drashnas Viterbi Macro Pad
#ifdef AUDIO_ENABLE
-# define C6_AUDIO
-# define NO_MUSIC_MODE
+# define C6_AUDIO
+# define NO_MUSIC_MODE
#endif
+// clang-format off
#define LAYOUT_ortho_5x7( \
L00, L01, L02, L03, L04, L05, L06, \
L10, L11, L12, L13, L14, L15, L16, \
@@ -56,8 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ L30, L31, L32, L33, L34, L35, L36 }, \
{ L40, L41, L42, L43, L44, L45, L46 }, \
}
+// clang-format on
-#define QMK_ESC_OUTPUT F5 // usually COL
-#define QMK_ESC_INPUT D4 // usually ROW
+#define QMK_ESC_OUTPUT F5 // usually COL
+#define QMK_ESC_INPUT D4 // usually ROW
#define QMK_LED B0
#define QMK_SPEAKER C6
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
index 9c17c5a577..3b213418d6 100644
--- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
@@ -1,24 +1,15 @@
-#include QMK_KEYBOARD_H
#include "drashna.h"
-extern keymap_config_t keymap_config;
-
-// Each layer gets a name for readability, which is then used in the keymap matrix below.
-// The underscores don't mean anything - you can have a layer called STUFF or any other name.
-// Layer names don't all need to be of the same length, obviously, and you can also skip them
-// entirely and just use numbers.
-
-
// Fillers to make layering more clear
-#define DIABLO TG(_DIABLO)
-#define GAMEPAD TG(_GAMEPAD)
-#define MEDIA TT(_MEDIA)
+#define DIABLO TG(_DIABLO)
+#define GAMEPAD TG(_GAMEPAD)
+#define MEDIA TT(_MEDIA)
-
-//enum more_custom_keycodes {
+// enum more_custom_keycodes {
// KC_P00 = NEW_SAFE_RANGE
//};
+// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NUMLOCK] = LAYOUT_ortho_5x7(
@@ -55,32 +46,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-
-
+// clang-format on
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
-
- //switch (keycode) {
- //case KC_P00:
- // if (!record->event.pressed) {
- // tap(KC_KP_0);
- // tap(KC_KP_0);
- // }
- // return false;
- // break;
- //}
- return true;
+ // switch (keycode) {
+ // case KC_P00:
+ // if (!record->event.pressed) {
+ // tap(KC_KP_0);
+ // tap(KC_KP_0);
+ // }
+ // return false;
+ // break;
+ //}
+ return true;
}
-
-
-
void matrix_init_keymap(void) {
- #ifndef CONVERT_TO_PROTON_C
+#ifndef CONVERT_TO_PROTON_C
setPinOutput(D5);
writePinHigh(D5);
setPinOutput(B0);
writePinHigh(B0);
- #endif
+#endif
}
diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h
new file mode 100644
index 0000000000..83d6283f56
--- /dev/null
+++ b/keyboards/kyria/keymaps/drashna/config.h
@@ -0,0 +1,38 @@
+/* Copyright 2019 Thomas Baart <thomas@splitkb.com>
+ *
+ * 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
+
+#define EE_HANDS
+
+#ifdef OLED_DRIVER_ENABLE
+# define OLED_DISPLAY_128X64
+# define OLED_FONT_H "font_gmk_bad.h"
+# define OLED_DISABLE_TIMEOUT
+# define OLED_SCROLL_TIMEOUT_RIGHT 60000
+#endif
+
+#ifdef RGBLIGHT_ENABLE
+# define RGBLIGHT_SLEEP
+# define RGBLIGHT_LIMIT_VAL 200
+# define RGBLIGHT_HUE_STEP 8
+# define RGBLIGHT_SAT_STEP 8
+# define RGBLIGHT_VAL_STEP 8
+#endif
+
+// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
+#define SPLIT_USB_DETECT
+#define SPLIT_USB_TIMEOUT 1000
diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c
new file mode 100644
index 0000000000..bdb00e5967
--- /dev/null
+++ b/keyboards/kyria/keymaps/drashna/keymap.c
@@ -0,0 +1,372 @@
+#include "drashna.h"
+
+uint8_t is_master;
+
+#ifdef OLED_DRIVER_ENABLE
+# define KEYLOGGER_LENGTH 10
+static uint32_t oled_timer = 0;
+static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
+static uint16_t log_timer = 0;
+// clang-format off
+static const char PROGMEM code_to_name[0xFF] = {
+// 0 1 2 3 4 5 6 7 8 9 A B c D E F
+ ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
+ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
+ '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
+ ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
+ ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
+ 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
+};
+
+void add_keylog(uint16_t keycode);
+#endif
+
+#ifndef UNICODE_ENABLE
+# define UC(x) KC_NO
+#endif
+
+/*
+ * The `LAYOUT_kyria_base` macro is a template to allow the use of identical
+ * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
+ * that there is no need to set them up for each layout, and modify all of
+ * them if I want to change them. This helps to keep consistency and ease
+ * of use. K## is a placeholder to pass through the individual keycodes
+ */
+
+// clang-format off
+#define LAYOUT_kyria_base( \
+ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
+ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
+ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
+ ) \
+ LAYOUT_wrapper( \
+ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
+ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
+ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
+ KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \
+ )
+/* Re-pass though to allow templates to be used */
+#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT_kyria_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
+
+ [_COLEMAK] = LAYOUT_kyria_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
+
+ [_DVORAK] = LAYOUT_kyria_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
+
+ [_WORKMAN] = LAYOUT_kyria_base_wrapper(
+ _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
+ _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
+ _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
+ ),
+
+ [_NORMAN] = LAYOUT_kyria_base_wrapper(
+ _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
+ _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
+ _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
+ ),
+
+ [_MALTRON] = LAYOUT_kyria_base_wrapper(
+ _________________MALTRON_L1________________, _________________MALTRON_R1________________,
+ _________________MALTRON_L2________________, _________________MALTRON_R2________________,
+ _________________MALTRON_L3________________, _________________MALTRON_R3________________
+ ),
+
+ [_EUCALYN] = LAYOUT_kyria_base_wrapper(
+ _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
+ _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
+ _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
+ ),
+
+ [_CARPLAX] = LAYOUT_kyria_base_wrapper(
+ _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
+ _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
+ _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
+ ),
+ [_MODS] = LAYOUT_wrapper(
+ _______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
+ _______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
+ KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT,
+ _______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______
+ ),
+ [_LOWER] = LAYOUT_wrapper(
+ KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
+ _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
+ _______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [_RAISE] = LAYOUT_wrapper(
+ KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11,
+ _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
+ _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [_ADJUST] = LAYOUT_wrapper(
+ KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
+ VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
+ _______, _________________ADJUST_L3_________________, HPT_TOG, HPT_FBK, MG_NKRO, UC_MOD, _________________ADJUST_R3_________________, TG_MODS,
+ _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, _______
+ ),
+// [_LAYERINDEX] = LAYOUT_wrapper(
+// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ______