summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/community/ergodox/drashna/keymap.c219
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c143
-rw-r--r--layouts/community/ortho_4x12/drashna/rules.mk14
-rw-r--r--layouts/community/ortho_5x12/drashna/keymap.c44
-rw-r--r--layouts/community/split_3x6_3/drashna/config.h12
-rw-r--r--layouts/community/split_3x6_3/drashna/keymap.c110
6 files changed, 177 insertions, 365 deletions
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 600e29020d..430328fed7 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -56,145 +56,33 @@ bool skip_leds = false;
KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \
)
-#define LAYOUT_ergodox_pretty_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__)
+#define LAYOUT_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* Keymap 0: QWERTY Layer
- *
- *
- * ,--------------------------------------------------. ,--------------------------------------------------.
- * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ |
- * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
- * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | |
- * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
- * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " |
- * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------|
- * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift |
- * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
- * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
- * `----------------------------------' `----------------------------------'
- * ,--------------. ,--------------.
- * |Alt/Ap| Win | | Alt |Ctl/Esc|
- * ,------|------|-------| |------+-------+------.
- * | | | Home | | PgUp | | |
- * | Space| Bksp |-------| |------| DEL |Enter |
- * | | | End | | PgDn | | |
- * `---------------------' `---------------------'
- */
- [_QWERTY] = LAYOUT_ergodox_pretty_base_wrapper(
- _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
- _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
- _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
- ),
-/* Keymap 0: COLEMAK layer
- *
- * ,--------------------------------------------------. ,--------------------------------------------------.
- * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
- * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
- * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
- * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
- * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
- * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
- * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
- * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
- * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
- * `----------------------------------' `----------------------------------'
- * ,-------------. ,-------------.
- * | App | LGui | | Alt |Ctrl/Esc|
- * ,------|------|------| |------+--------+------.
- * | | | Home | | PgUp | | |
- * | Space|Backsp|------| |------| Tab |Enter |
- * | |ace | End | | PgDn | | |
- * `--------------------' `----------------------'
- */
-// If it accepts an argument (i.e, is a function), it doesn't need KC_.
-// Otherwise, it needs KC_*
- [_COLEMAK] = LAYOUT_ergodox_pretty_base_wrapper(
- _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
- _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
- _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
- ),
-/* Keymap 0: DVORAK Layout
- *
- * ,--------------------------------------------------. ,--------------------------------------------------.
- * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
- * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
- * | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / |
- * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
- * | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - |
- * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
- * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
- * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
- * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
- * `----------------------------------' `----------------------------------'
- * ,-------------. ,-------------.
- * | App | LGui | | Alt |Ctrl/Esc|
- * ,------|------|------| |------+--------+------.
- * | | | Home | | PgUp | | |
- * | Space|Backsp|------| |------| Tab |Enter |
- * | |ace | End | | PgDn | | |
- * `--------------------' `----------------------'
- */
-// If it accepts an argument (i.e, is a function), it doesn't need KC_.
-// Otherwise, it needs KC_*
- [_DVORAK] = LAYOUT_ergodox_pretty_base_wrapper(
- _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
- _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
- _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
- ),
-/* Keymap 0: WORKMAN layer
- *
- * ,--------------------------------------------------. ,--------------------------------------------------.
- * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
- * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
- * | Del | Q | D | R | W | B | L1 | | L1 | J | F | U | P | ; | \ |
- * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
- * | BkSp | A | S | H | T | D |------| |------| Y | N | E | O | I | ' |
- * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
- * | LShift |Z/Ctrl| X | M | C | V | | | | K | L | , | . |//Ctrl| RShift |
- * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
- * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
- * `----------------------------------' `----------------------------------'
- * ,-------------. ,-------------.
- * | App | LGui | | Alt |Ctrl/Esc|
- * ,------|------|------| |------+--------+------.
- * | | | Home | | PgUp | | |
- * | Space|Backsp|------| |------| Tab |Enter |
- * | |ace | End | | PgDn | | |
- * `--------------------' `----------------------'
- */
-
- [_WORKMAN] = LAYOUT_ergodox_pretty_base_wrapper(
- _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
- _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
- _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
- ),
-
- [_NORMAN] = LAYOUT_ergodox_pretty_base_wrapper(
- _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
- _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
- _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
- ),
-
- [_MALTRON] = LAYOUT_ergodox_pretty_base_wrapper(
- _________________MALTRON_L1________________, _________________MALTRON_R1________________,
- _________________MALTRON_L2________________, _________________MALTRON_R2________________,
- _________________MALTRON_L3________________, _________________MALTRON_R3________________
- ),
-
- [_EUCALYN] = LAYOUT_ergodox_pretty_base_wrapper(
- _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
- _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
- _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
- ),
-
- [_CARPLAX] = LAYOUT_ergodox_pretty_base_wrapper(
- _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
- _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
- _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
- ),
+ [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
+
+ [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper(
+ ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________,
+ ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________,
+ ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________
+ ),
+ [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
+
+ [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
/* Keymap 4: Customized Overwatch Layout
*
@@ -311,9 +199,7 @@ void keyboard_post_init_keymap(void) {
// trackball_set_precision(1.5);
trackball_set_rgbw(RGB_MAGENTA, 0x00);
}
-void shutdown_keymap(void) {
- trackball_set_rgbw(RGB_RED, 0x00);
-}
+void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); }
static bool mouse_button_one, trackball_button_one;
@@ -328,8 +214,6 @@ void trackball_register_button(bool pressed, enum mouse_buttons button) {
}
#endif
-
-
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_1:
@@ -371,17 +255,17 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
run_trackball_cleanup();
break;
-#if !defined(MOUSEKEY_ENABLE)
- case KC_MS_BTN1:
- mouse_button_one = record->event.pressed;
- trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1);
- break;
- case KC_MS_BTN2:
- trackball_register_button(record->event.pressed, MOUSE_BTN2);
- break;
- case KC_MS_BTN3:
- trackball_register_button(record->event.pressed, MOUSE_BTN3);
- break;
+# if !defined(MOUSEKEY_ENABLE)
+ case KC_MS_BTN1:
+ mouse_button_one = record->event.pressed;
+ trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1);
+ break;
+ case KC_MS_BTN2:
+ trackball_register_button(record->event.pressed, MOUSE_BTN2);
+ break;
+ case KC_MS_BTN3:
+ trackball_register_button(record->event.pressed, MOUSE_BTN3);
+ break;
# endif
#endif
}
@@ -434,7 +318,6 @@ 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 rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
-
if (layer_state_is(_GAMEPAD)) {
RGB_MATRIX_INDICATOR_SET_COLOR(32, 0x00, 0xFF, 0x00); // Q
RGB_MATRIX_INDICATOR_SET_COLOR(31, 0x00, 0xFF, 0xFF); // W
@@ -447,7 +330,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 26 : 27), 0xFF, 0xFF, 0xFF); // 1
RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 27 : 26), 0x00, 0xFF, 0x00); // 2
- RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x7A, 0x00, 0xFF); // 3
+ RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x7A, 0x00, 0xFF); // 3
}
# if defined(RGBLIGHT_ENABLE)
@@ -456,7 +339,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (userspace_config.rgb_layer_change)
# endif
{
- switch (get_highest_layer(layer_state|default_layer_state)) {
+ switch (get_highest_layer(layer_state | default_layer_state)) {
case _GAMEPAD:
rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
break;
@@ -472,29 +355,17 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
case _ADJUST:
rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
break;
- case _QWERTY:
- rgb_matrix_layer_helper(HSV_CYAN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ case _DEFAULT_LAYER_1:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
break;
- case _COLEMAK:
- rgb_matrix_layer_helper(HSV_MAGENTA, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _DVORAK:
- rgb_matrix_layer_helper(HSV_SPRINGGREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _WORKMAN:
- rgb_matrix_layer_helper(HSV_GOLDENROD, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _NORMAN:
- rgb_matrix_layer_helper(HSV_CORAL, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _MALTRON:
- rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ case _DEFAULT_LAYER_2:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
break;
- case _EUCALYN:
- rgb_matrix_layer_helper(HSV_PINK, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ case _DEFAULT_LAYER_3:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
break;
- case _CARPLAX:
- rgb_matrix_layer_helper(HSV_BLUE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ case _DEFAULT_LAYER_4:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
break;
}
}
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 1384221b5f..9ef2317f44 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -16,7 +16,6 @@
#include "drashna.h"
-
#ifdef BACKLIGHT_ENABLE
enum planck_keycodes {
BACKLIT = NEW_SAFE_RANGE,
@@ -62,58 +61,32 @@ enum planck_keycodes {
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
)
-#define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)
+#define LAYOUT_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_ortho_4x12_base_wrapper(
- _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
- _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
- _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
- ),
-
- [_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper(
- _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
- _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
- _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
- ),
-
- [_DVORAK] = LAYOUT_ortho_4x12_base_wrapper(
- _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
- _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
- _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
- ),
-
- [_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper(
- _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
- _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
- _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
- ),
-
- [_NORMAN] = LAYOUT_ortho_4x12_base_wrapper(
- _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
- _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
- _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
- ),
-
- [_MALTRON] = LAYOUT_ortho_4x12_base_wrapper(
- _________________MALTRON_L1________________, _________________MALTRON_R1________________,
- _________________MALTRON_L2________________, _________________MALTRON_R2________________,
- _________________MALTRON_L3________________, _________________MALTRON_R3________________
- ),
-
- [_EUCALYN] = LAYOUT_ortho_4x12_base_wrapper(
- _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
- _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
- _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
- ),
-
- [_CARPLAX] = LAYOUT_ortho_4x12_base_wrapper(
- _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
- _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
- _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
- ),
+ [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
+
+ [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper(
+ ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________,
+ ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________,
+ ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________
+ ),
+ [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
+
+ [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
[_LOWER] = LAYOUT_ortho_4x12_wrapper(
KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC,
@@ -137,6 +110,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP } },
+ [_DEFAULT_LAYER_2] = { { _______, _______ } },
+ [_DEFAULT_LAYER_3] = { { _______, _______ } },
+ [_DEFAULT_LAYER_4] = { { _______, _______ } },
+ [_GAMEPAD] = { { _______, _______ } },
+ [_DIABLO] = { { _______, _______ } },
+ [_MOUSE] = { { KC_WH_D, KC_WH_U } },
+ [_MEDIA] = { { _______, _______ } },
+ [_RAISE] = { { KC_VOLD, KC_VOLU } },
+ [_LOWER] = { { RGB_MOD, RGB_RMOD} },
+ [_ADJUST] = { { CK_DOWN, CK_UP } },
+};
+#endif
// clang-format on
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
@@ -222,7 +211,6 @@ void suspend_wakeup_init_keymap(void) {
}
// clang-format on
-
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
uint8_t this_mod = get_mods();
uint8_t this_led = host_keyboard_leds();
@@ -254,49 +242,38 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
case _ADJUST:
rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
break;
- default: {
- switch (get_highest_layer(default_layer_state)) {
- case _QWERTY:
- rgb_matrix_layer_helper(HSV_CYAN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _COLEMAK:
- rgb_matrix_layer_helper(HSV_MAGENTA, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _DVORAK:
- rgb_matrix_layer_helper(HSV_SPRINGGREEN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _WORKMAN:
- rgb_matrix_layer_helper(HSV_GOLDENROD, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _NORMAN:
- rgb_matrix_layer_helper(HSV_CORAL, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _MALTRON:
- rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _EUCALYN:
- rgb_matrix_layer_helper(HSV_PINK, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
- case _CARPLAX:
- rgb_matrix_layer_helper(HSV_BLUE, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
- break;
+ default:
+ {
+ switch (get_highest_layer(default_layer_state)) {
+ case _DEFAULT_LAYER_1:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ break;
+ case _DEFAULT_LAYER_2:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ break;
+ case _DEFAULT_LAYER_3:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ break;
+ case _DEFAULT_LAYER_4:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max);
+ break;
+ }
+ break;
}
- break;
- }
}
}
switch (get_highest_layer(default_layer_state)) {
- case _QWERTY:
+ case _DEFAULT_LAYER_1:
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF);
break;
- case _COLEMAK:
+ case _DEFAULT_LAYER_2:
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF);
break;
- case _DVORAK:
+ case _DEFAULT_LAYER_3:
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00);
break;
- case _WORKMAN:
+ case _DEFAULT_LAYER_4:
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21);
break;
}
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk
index 06a250ee79..e78d073ae3 100644
--- a/layouts/community/ortho_4x12/drashna/rules.mk
+++ b/layouts/community/ortho_4x12/drashna/rules.mk
@@ -22,6 +22,7 @@ else
RGB_MATRIX_ENABLE = no
AUDIO_ENABLE = yes
EEPROM_DRIVER = i2c
+ ENCODER_MAP_ENABLE = yes
endif
ifeq ($(strip $(KEYBOARD)), planck/light)
RGB_MATRIX_ENABLE = yes
@@ -31,13 +32,14 @@ ifeq ($(strip $(KEYBOARD)), planck/light)
# HAPTIC_ENABLE += SOLENOID
endif
ifeq ($(strip $(KEYBOARD)), planck/ez)
- RGBLIGHT_ENABLE = no
- ENCODER_ENABLE = yes
- RGB_MATRIX_ENABLE = yes
+ RGBLIGHT_ENABLE = no
+ ENCODER_ENABLE = yes
+ ENCODER_MAP_ENABLE = yes
+ RGB_MATRIX_ENABLE = yes
INDICATOR_LIGHTS = yes
RGBLIGHT_TWINKLE = yes
RGBLIGHT_STARTUP_ANIMATION = yes
- CONSOLE_ENABLE = yes
- COMMAND_ENABLE = yes
- AUDIO_ENABLE = yes
+ CONSOLE_ENABLE = yes
+ COMMAND_ENABLE = yes
+ AUDIO_ENABLE = yes
endif
diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c
index f882ead171..01b06d627d 100644
--- a/layouts/community/ortho_5x12/drashna/keymap.c
+++ b/layouts/community/ortho_5x12/drashna/keymap.c
@@ -38,34 +38,32 @@
KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
)
-#define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__)
+#define LAYOUT_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
-[_QWERTY] = LAYOUT_ortho_5x12_base_wrapper(
- _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
- _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
- _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
-),
-
-[_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper(
- _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
- _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
- _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
-),
+ [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper(
+ ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________,
+ ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________,
+ ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________
+ ),
+ [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
-[_DVORAK] = LAYOUT_ortho_5x12_base_wrapper(
- _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
- _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
- _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
-),
-
-[_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper(
- _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
- _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
- _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
-),
+ [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
/* Lower
* ,-----------------------------------------------------------------------------------.
diff --git a/layouts/community/split_3x6_3/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h
index 4a094e1954..b86448c671 100644
--- a/layouts/community/split_3x6_3/drashna/config.h
+++ b/layouts/community/split_3x6_3/drashna/config.h
@@ -50,11 +50,13 @@
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-# define RGB_MATRIX_HUE_STEP 8
-# define RGB_MATRIX_SAT_STEP 8
-# define RGB_MATRIX_VAL_STEP 5
-# define RGB_MATRIX_SPD_STEP 10
+# ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+# endif
+# define RGB_MATRIX_HUE_STEP 8
+# define RGB_MATRIX_SAT_STEP 8
+# define RGB_MATRIX_VAL_STEP 5
+# define RGB_MATRIX_SPD_STEP 10
#endif
#ifdef CONVERT_TO_PROTON_C
diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c
index e46b626ef9..0840fc2628 100644
--- a/layouts/community/split_3x6_3/drashna/keymap.c
+++ b/layouts/community/split_3x6_3/drashna/keymap.c
@@ -39,56 +39,32 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
RGB_MOD, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \
)
-#define LAYOUT_split_3x6_3_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__)
+#define LAYOUT_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_split_3x6_3_base_wrapper(
- _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
- _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
- _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
- ),
-
- [_COLEMAK] = LAYOUT_split_3x6_3_base_wrapper(
- _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
- _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
- _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
- ),
-
- [_DVORAK] = LAYOUT_split_3x6_3_base_wrapper(
- _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
- _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
- _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
- ),
-
- [_WORKMAN] = LAYOUT_split_3x6_3_base_wrapper(
- _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
- _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
- _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
- ),
-
- [_NORMAN] = LAYOUT_split_3x6_3_base_wrapper(
- _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
- _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
- _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
- ),
-
- [_MALTRON] = LAYOUT_split_3x6_3_base_wrapper(
- _________________MALTRON_L1________________, _________________MALTRON_R1________________,
- _________________MALTRON_L2________________, _________________MALTRON_R2________________,
- _________________MALTRON_L3________________, _________________MALTRON_R3________________
- ),
-
- [_EUCALYN] = LAYOUT_split_3x6_3_base_wrapper(
- _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
- _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
- _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
- ),
-
- [_CARPLAX] = LAYOUT_split_3x6_3_base_wrapper(
- _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
- _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
- _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
- ),
+ [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
+ ),
+
+ [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper(
+ ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________,
+ ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________,
+ ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________
+ ),
+
+ [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper(
+ _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
+ _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
+ _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
+ ),
+
+ [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper(
+ _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
+ _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
+ _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
+ ),
[_LOWER] = LAYOUT_split_3x6_3_wrapper(
KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
@@ -114,9 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format on
#ifdef OLED_DRIVER_ENABLE
-oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
- return OLED_ROTATION_270;
-}
+oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_270; }
#endif
#ifdef TAPPING_TERM_PER_KEY
@@ -130,7 +104,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
}
#endif
-
void matrix_slave_scan_user(void) {
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_task();
@@ -145,28 +118,16 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); }
void check_default_layer(uint8_t mode, uint8_t type, uint8_t led_min, uint8_t led_max) {
switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
- rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type, led_min, led_max);
+ rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max);
+ break;
+ case _COLEMAK_DH:
+ rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max);
break;
case _COLEMAK:
- rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type, led_min, led_max);
+ rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max);
break;
case _DVORAK:
- rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type, led_min, led_max);
- break;
- case _WORKMAN:
- rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type, led_min, led_max);
- break;
- case _NORMAN:
- rgb_matrix_layer_helper(HSV_CORAL, mode, rgb_matrix_config.speed, type, led_min, led_max);
- break;
- case _MALTRON:
- rgb_matrix_layer_helper(HSV_YELLOW, mode, rgb_matrix_config.speed, type, led_min, led_max);
- break;
- case _EUCALYN:
- rgb_matrix_layer_helper(HSV_PINK, mode, rgb_matrix_config.speed, type, led_min, led_max);
- break;
- case _CARPLAX:
- rgb_matrix_layer_helper(HSV_BLUE, mode, rgb_matrix_config.speed, type, led_min, led_max);
+ rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max);
break;
}
}
@@ -189,10 +150,11 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
case _ADJUST:
rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max);
break;
- default: {
- check_default_layer(0, LED_FLAG_UNDERGLOW, led_min, led_max);
- break;
- }
+ default:
+ {
+ check_default_layer(0, LED_FLAG_UNDERGLOW, led_min, led_max);
+ break;
+ }
}
check_default_layer(0, LED_FLAG_MODIFIER, led_min, led_max);
}