summaryrefslogtreecommitdiff
path: root/layouts/community/ortho_4x12/drashna
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community/ortho_4x12/drashna')
-rw-r--r--layouts/community/ortho_4x12/drashna/config.h2
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c146
-rw-r--r--layouts/community/ortho_4x12/drashna/rules.mk16
3 files changed, 72 insertions, 92 deletions
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index f4abd64f57..43143c3a3a 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -37,7 +37,7 @@
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# undef RGB_MATRIX_LED_PROCESS_LIMIT
# undef RGB_MATRIX_LED_FLUSH_LIMIT
# ifdef KEYBOARD_planck_rev6
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 82594b9fd4..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;
}
@@ -368,7 +345,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif // ENCODER_ENABLE
#ifdef KEYBOARD_planck_rev6
-void dip_update(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -391,6 +368,7 @@ void dip_update(uint8_t index, bool active) {
userspace_config.nuke_switch = active;
break;
}
+ return true;
}
#endif // KEYBOARD_planck_rev6
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk
index 06a250ee79..dc64fe63bc 100644
--- a/layouts/community/ortho_4x12/drashna/rules.mk
+++ b/layouts/community/ortho_4x12/drashna/rules.mk
@@ -1,4 +1,4 @@
-BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
TAP_DANCE_ENABLE = no
@@ -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