summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-02-04 19:44:02 +0100
committerJack Humbert <jack.humb@gmail.com>2018-02-04 19:44:02 +0100
commit598384bc1064ab9250191a1727c27a0eea406756 (patch)
treed4effea1e1f7207a924135fd93a29fbad8c8dd41
parentac82cd1ba77f4ed8d38f17662864c6a56a8da293 (diff)
downloadqmk_firmware-598384bc1064ab9250191a1727c27a0eea406756.tar.gz
qmk_firmware-598384bc1064ab9250191a1727c27a0eea406756.tar.xz
Update to drashna userspace (Keymap Templating) (#2338)
* Change tapping term to be longer * Make Audio/Underglow settings permanent * Use wait_ms rather than _delay_ms * Readd One Shot Mods * Switch to Imperial March startup sound * Move OSM to it's own layer * Minor Formatting Tweaks * Keymap Templates and formatting fixes
-rw-r--r--keyboards/ergodox_ez/keymaps/drashna/config.h2
-rw-r--r--keyboards/ergodox_ez/keymaps/drashna/keymap.c164
-rw-r--r--keyboards/orthodox/keymaps/drashna/config.h2
-rw-r--r--keyboards/orthodox/keymaps/drashna/keymap.c57
-rw-r--r--keyboards/orthodox/keymaps/drashna/rules.mk2
-rw-r--r--users/drashna/drashna.c36
-rw-r--r--users/drashna/drashna.h63
-rw-r--r--users/drashna/readme.md16
8 files changed, 215 insertions, 127 deletions
diff --git a/keyboards/ergodox_ez/keymaps/drashna/config.h b/keyboards/ergodox_ez/keymaps/drashna/config.h
index 2f5422b14..d543379a3 100644
--- a/keyboards/ergodox_ez/keymaps/drashna/config.h
+++ b/keyboards/ergodox_ez/keymaps/drashna/config.h
@@ -15,7 +15,7 @@
#ifdef TAPPING_TERM
#undef TAPPING_TERM
#endif
-#define TAPPING_TERM 150
+#define TAPPING_TERM 175
#undef PERMISSIVE_HOLD
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
#define ONESHOT_TAP_TOGGLE 2
diff --git a/keyboards/ergodox_ez/keymaps/drashna/keymap.c b/keyboards/ergodox_ez/keymaps/drashna/keymap.c
index 0d0e1fba2..268a1d085 100644
--- a/keyboards/ergodox_ez/keymaps/drashna/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/drashna/keymap.c
@@ -48,26 +48,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | End | | PgDn | | |
* `---------------------' `---------------------'
*/
- [_QWERTY] = LAYOUT_ergodox(
- KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(_DIABLO),
- KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
- KC_LSFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
- LT(_SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
+ [_QWERTY] = LAYOUT_ergodox_wrapper(
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
+ KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO),
+ KC_BSPC, _________________QWERTY_L2_________________,
+ KC_LSFT, _________________QWERTY_L3_________________, TG(_GAMEPAD),
+ LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
- ALT_T(KC_APPLICATION), KC_LGUI,
- KC_HOME,
- KC_SPACE, KC_BSPACE, KC_END,
+ ALT_T(KC_APP), KC_LGUI,
+ KC_HOME,
+ KC_SPACE,KC_BSPC, KC_END,
- TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
- TG(_DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
- KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
- TG(_GAMEPAD), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),OSM(MOD_RSFT),
- KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
- KC_RGUI, CTL_T(KC_ESCAPE),
- KC_PGUP,
- KC_PGDOWN, KC_DELETE, KC_ENTER
- ),
+ TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS,
+ _________________QWERTY_R2_________________, GUI_T(KC_QUOT),
+ TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_RSFT,
+ ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
+ KC_RGUI, CTL_T(KC_ESCAPE),
+ KC_PGUP,
+ KC_PGDOWN, KC_DELETE, KC_ENTER
+ ),
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
@@ -91,25 +91,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
-[_COLEMAK] = LAYOUT_ergodox(
+[_COLEMAK] = LAYOUT_ergodox_wrapper(
// left hand
- KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
- KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(_DIABLO),
- KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
- KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
- LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
- ALT_T(KC_APP), KC_LGUI,
- KC_HOME,
- KC_SPC,KC_BSPC,KC_END,
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
+ KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO),
+ KC_BSPC, _________________COLEMAK_L2________________,
+ KC_LSFT, _________________COLEMAK_L3________________, TG(_GAMEPAD),
+ LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
+ ALT_T(KC_APP), KC_LGUI,
+ KC_HOME,
+ KC_SPACE,KC_BSPC, KC_END,
// right hand
- TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- TG(_DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
- KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
- TG(_GAMEPAD),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
- KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
- KC_RGUI, CTL_T(KC_ESC),
- KC_PGUP,
- KC_PGDN,KC_DELETE, KC_ENT
+ TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS,
+ _________________COLEMAK_R2________________, GUI_T(KC_QUOT),
+ TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_RSFT,
+ ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
+ KC_RGUI, CTL_T(KC_ESCAPE),
+ KC_PGUP,
+ KC_PGDOWN, KC_DELETE, KC_ENTER
),
/* Keymap 0: Basic layer
*
@@ -134,25 +134,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
-[_DVORAK] = LAYOUT_ergodox(
+[_DVORAK] = LAYOUT_ergodox_wrapper(
// left hand
- KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
- KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
- KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
- KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
- LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
- ALT_T(KC_APP), KC_LEAD,
- KC_HOME,
- KC_SPC,KC_BSPC,KC_END,
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
+ KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO),
+ KC_BSPC, _________________DVORAK_L2_________________,
+ KC_LSFT, _________________DVORAK_L3_________________, TG(_GAMEPAD),
+ LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
+ ALT_T(KC_APP), KC_LGUI,
+ KC_HOME,
+ KC_SPACE,KC_BSPC, KC_END,
// right hand
- TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
- TG(_DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
- KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
- TG(_GAMEPAD),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), OSM(MOD_RSFT),
- KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, TT(_SYMB),
- KC_LALT, CTL_T(KC_ESC),
- KC_PGUP,
- KC_PGDN,KC_DELETE, KC_ENT
+ TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
+ TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH,
+ _________________DVORAK_R2_________________, GUI_T(KC_MINS),
+ TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_RSFT,
+ ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
+ KC_RGUI, CTL_T(KC_ESCAPE),
+ KC_PGUP,
+ KC_PGDOWN, KC_DELETE, KC_ENTER
),
/* Keymap 0: Basic layer
*
@@ -177,27 +177,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
-[_WORKMAN] = LAYOUT_ergodox(
+[_WORKMAN] = LAYOUT_ergodox_wrapper(
// left hand
- KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
- KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(_DIABLO),
- KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
- KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_GAMEPAD),
- LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
- ALT_T(KC_APP), KC_LEAD,
- KC_HOME,
- KC_SPC,KC_BSPC,KC_END,
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
+ KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO),
+ KC_BSPC, _________________WORKMAN_L2________________,
+ KC_LSFT, _________________WORKMAN_L3________________, TG(_GAMEPAD),
+ LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________,
+ ALT_T(KC_APP), KC_LGUI,
+ KC_HOME,
+ KC_SPACE,KC_BSPC, KC_END,
// right hand
- TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- TG(_DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
- KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
- TG(_GAMEPAD),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
- KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
- KC_LALT, CTL_T(KC_ESC),
- KC_PGUP,
- KC_PGDN,KC_DELETE, KC_ENT
+ TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS,
+ _________________WORKMAN_R2________________, GUI_T(KC_QUOT),
+ TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_RSFT,
+ ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB),
+ KC_RGUI, CTL_T(KC_ESCAPE),
+ KC_PGUP,
+ KC_PGDOWN, KC_DELETE, KC_ENTER
),
+ [_MODS] = LAYOUT_ergodox(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ OSM(MOD_LSFT),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS,
+
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, OSM(MOD_RSFT),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
/* Keymap 3: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
@@ -220,11 +240,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------' `--------------------'
*/
[_SYMB] = LAYOUT_ergodox(
- EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
- VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
+ EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, TG(_MODS),
+ VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_WORKMAN,
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
- KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
+ KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
RGB_SMOD, KC_RGB_T,
RGB_HUI,
RGB_M_R, RGB_M_SW, RGB_HUD,
diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h
index d83b77927..c83380bd0 100644
--- a/keyboards/orthodox/keymaps/drashna/config.h
+++ b/keyboards/orthodox/keymaps/drashna/config.h
@@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef AUDIO_ENABLE
#define C6_AUDIO
-#define STARTUP_SONG SONG(ZELDA_TREASURE)
+#define STARTUP_SONG SONG(IMPERIAL_MARCH)
#endif
#undef PRODUCT
diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c
index f74b39ae4..cb76a20bd 100644
--- a/keyboards/orthodox/keymaps/drashna/keymap.c
+++ b/keyboards/orthodox/keymaps/drashna/keymap.c
@@ -31,49 +31,54 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
-
+#define KC_MSHF OSM(MOD_LSFT)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = KEYMAP(\
- 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_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
- KC_LSFT,CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
+[_QWERTY] = KEYMAP_wrapper(\
+ KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, \
+ KC_TAB, _________________QWERTY_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________QWERTY_R2_________________, KC_QUOT, \
+ KC_LSFT, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_LGUI \
),
-[_COLEMAK] = KEYMAP(\
- KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
- KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
- KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH), KC_LGUI \
+[_COLEMAK] = KEYMAP_wrapper(\
+ KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, \
+ KC_TAB, _________________COLEMAK_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________COLEMAK_R2________________, KC_QUOT, \
+ KC_LSFT, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_LGUI \
),
-[_DVORAK] = KEYMAP(\
- KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
- KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
- KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
+[_DVORAK] = KEYMAP_wrapper(\
+ KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, \
+ KC_TAB, _________________DVORAK_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________DVORAK_R2_________________, KC_MINS, \
+ KC_LSFT, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_LGUI \
+),
+[_WORKMAN] = KEYMAP_wrapper(\
+ KC_ESC, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, \
+ KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS, \
+ KC_LSFT, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI \
),
-[_WORKMAN] = KEYMAP(\
- KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
- KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
- KC_LSFT,CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
+[_MODS] = KEYMAP(\
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ OSM(MOD_LSFT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
[_LOWER] = KEYMAP(\
- KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
- KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
- _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
),
[_RAISE] = KEYMAP(\
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
- KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, _______, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
- _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, _______, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \
),
[_ADJUST] = KEYMAP(\
- KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
- KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
+ KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), \
+ KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
)
diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk
index c4cf6629c..222a43640 100644
--- a/keyboards/orthodox/keymaps/drashna/rules.mk
+++ b/keyboards/orthodox/keymaps/drashna/rules.mk
@@ -7,5 +7,3 @@ TAP_DANCE_ENABLE = no
RGBLIGHT_ENABLE = yes
AUDIO_ENABLE = yes
NKRO_ENABLE = yes
-FAUXCLICKY_ENABLE = no
-USE_I2C = no
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index a07d74407..6039c7c56 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -166,7 +166,7 @@ void matrix_init_user(void) {
}
#endif
#ifdef AUDIO_ENABLE
-// _delay_ms(21); // gets rid of tick
+// wait_ms(21); // gets rid of tick
// stop_all_notes();
// PLAY_SONG(tone_hackstartup);
#endif
@@ -329,7 +329,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("Salt, salt, salt...");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -340,7 +340,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("Please sir, can I have some more salt?!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -351,7 +351,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("Your salt only makes me harder, and even more aggressive!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -362,7 +362,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("Good game, everyone!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("Good luck, have fun!!!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -384,7 +384,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("Left click to win!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -395,7 +395,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -406,7 +406,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("That was positively riveting!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -417,9 +417,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("That aim is absolutely amazing. It's almost like you're a machine!" SS_TAP(X_ENTER));
- _delay_ms(3000);
+ wait_ms(3000);
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
SEND_STRING("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!" SS_TAP(X_ENTER));
@@ -430,7 +430,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("OMG!!! C9!!!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -441,7 +441,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
register_code(is_overwatch ? KC_BSPC : KC_ENTER);
unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
- _delay_ms(50);
+ wait_ms(50);
SEND_STRING("That was a fantastic game, though it was a bit easy. Try harder next time!");
register_code(KC_ENTER);
unregister_code(KC_ENTER);
@@ -471,16 +471,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//#elif defined(BOOTLOADER_CATERINA)
// ":avrdude"
#endif
-#ifdef RGBLIGHT_ENABLE
- " RGBLIGHT_ENABLE=yes"
-#else
- " RGBLIGHT_ENABLE=no"
-#endif
-#ifdef AUDIO_ENABLE
- " AUDIO_ENABLE=yes"
-#else
- " AUDIO_ENABLE=no"
-#endif
SS_TAP(X_ENTER));
}
return false;
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index aa9c83086..8354c55c9 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -26,8 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define _COLEMAK 1
#define _DVORAK 2
#define _WORKMAN 3
-#define _NAV 5
-#define _COVECUBE 6
+#define _MODS 4
+//#define _MISC 5
+#define _NAV 6
+#define _COVECUBE 7
#define _SYMB 8
#define _GAMEPAD 9
#define _DIABLO 10
@@ -142,4 +144,61 @@ enum {
#define AUD_OFF AU_OFF
#endif
+
+
+// Since our quirky block definitions are basically a list of comma separated
+// arguments, we need a wrapper in order for these definitions to be
+// expanded before being used as arguments to the LAYOUT_xxx macro.
+#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
+#define KEYMAP_wrapper(...) KEYMAP(__VA_ARGS__)
+
+// Blocks for each of the four major keyboard layouts
+// Organized so we can quickly adapt and modify all of them
+// at once, rather than for each keyboard, one at a time.
+// And this allows wor much cleaner blocks in the keymaps.
+// For instance Tap/Hold for Control on all of the layouts
+
+#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
+#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
+#define _________________QWERTY_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
+
+#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
+#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
+#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
+
+
+#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G
+#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D
+#define _________________COLEMAK_L3________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
+
+#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
+#define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O
+#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
+
+
+#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
+#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
+#define _________________DVORAK_L3_________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
+
+#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
+#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
+#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
+
+
+#define _________________WORKMAN_L1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
+#define _________________WORKMAN_L2________________ KC_A, KC_O, KC_E, KC_U, KC_I
+#define _________________WORKMAN_L3________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
+
+#define _________________WORKMAN_R1________________ KC_F, KC_G, KC_C, KC_R, KC_L
+#define _________________WORKMAN_R2________________ KC_D, KC_H, KC_T, KC_N, KC_S
+#define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
+
+
+
+// Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN),
+// this allows us to quickly modify the bottom row for all of the layouts
+// so we don't have to alter it 4 times and hope that we haven't missed
+// anything
+#define ___________ERGODOX_BOTTOM_LEFT_____________ KC_QUOT, KC_LGUI, KC_LBRC, KC_RBRC
+#define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
#endif
diff --git a/users/drashna/readme.md b/users/drashna/readme.md
index e77948ea9..92792fb97 100644
--- a/users/drashna/readme.md
+++ b/users/drashna/readme.md
@@ -20,6 +20,22 @@ This allows for keyboard specific configuration while maintaining the ability to
My [Ergodox EZ Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/drashna/keymap.c#L399) is a good example of this, as it uses the LEDs as modifier indicators.
+Keyboard Layout Templates
+-------------------------
+
+This borrows from @jola5's "Not quite neo" code. This allows me to maintain blocks of keymaps in the userspace, so that I can modify the userspace, and this is reflected in all of the keyboards that use it, at once.
+
+This makes adding tap/hold mods, or other special keycodes or functions to all keyboards super easy, as it's done to all of them at once.
+
+The caveat here is that the keymap needs a processor/wrapper, as it doesn't like the substitutions. However, this is as simple as just pushing it through a define. For instance:
+
+`#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)`
+
+Once that's been done and you've switched the keymaps to use the "wrapper", it will read the substitution blocks just fine.
+
+Credit goes to @jola5 for first implementing this awesome idea.
+
+
Custom Keycodes
---------------