summaryrefslogtreecommitdiff
path: root/keyboards/c39/keymaps/drashna
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/c39/keymaps/drashna')
-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
3 files changed, 102 insertions, 43 deletions
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