summaryrefslogtreecommitdiff
path: root/layouts/community/ortho_4x12/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-26 17:59:49 -0700
committerGitHub <noreply@github.com>2021-07-26 17:59:49 -0700
commiteb46c954dcf99d842967cc6095827316ffddd291 (patch)
tree69f0a5ade629b63731c246888c0e067312e0970f /layouts/community/ortho_4x12/drashna
parent368efb5d2b834d995ba24cd23349327bab02918b (diff)
[Keymap] Drashna's Defaults cleanup (#13722)
Diffstat (limited to 'layouts/community/ortho_4x12/drashna')
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c143
-rw-r--r--layouts/community/ortho_4x12/drashna/rules.mk14
2 files changed, 68 insertions, 89 deletions
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