summaryrefslogtreecommitdiffstats
path: root/keyboards/splitkb
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/splitkb')
-rw-r--r--keyboards/splitkb/kyria/keymaps/drashna/keymap.c101
-rw-r--r--keyboards/splitkb/kyria/keymaps/drashna/rules.mk8
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/keymap.c26
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/rules.mk1
4 files changed, 56 insertions, 80 deletions
diff --git a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c
index 14287d0ec6..d55110e977 100644
--- a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c
+++ b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c
@@ -38,58 +38,32 @@
KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \
)
/* Re-pass though to allow templates to be used */
-#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__)
+#define LAYOUT_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kyria_base_wrapper(
+ [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),
- [_COLEMAK] = LAYOUT_kyria_base_wrapper(
+ [_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_kyria_base_wrapper(
+ [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper(
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
- [_WORKMAN] = LAYOUT_kyria_base_wrapper(
- _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
- _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
- _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
- ),
-
- [_NORMAN] = LAYOUT_kyria_base_wrapper(
- _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
- _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
- _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
- ),
-
- [_MALTRON] = LAYOUT_kyria_base_wrapper(
- _________________MALTRON_L1________________, _________________MALTRON_R1________________,
- _________________MALTRON_L2________________, _________________MALTRON_R2________________,
- _________________MALTRON_L3________________, _________________MALTRON_R3________________
- ),
-
- [_EUCALYN] = LAYOUT_kyria_base_wrapper(
- _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
- _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
- _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
- ),
-
- [_CARPLAX] = LAYOUT_kyria_base_wrapper(
- _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
- _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
- _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
- ),
-
[_GAMEPAD] = LAYOUT_wrapper(
KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______,
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______,
@@ -128,6 +102,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 }, { KC_VOLD, KC_VOLU } },
+ [_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } },
+ [_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } },
+ [_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } },
+ [_GAMEPAD] = { { _______, _______ }, { _______, _______ } },
+ [_DIABLO] = { { _______, _______ }, { _______, _______ } },
+ [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } },
+ [_MEDIA] = { { _______, _______ }, { _______, _______ } },
+ [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
+ [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
+ [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
+};
+#endif
// clang-format on
#ifdef OLED_DRIVER_ENABLE
@@ -156,39 +146,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#endif
#ifdef RGBLIGHT_LAYERS
-const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS(
- { 8, 1, 120, 255, 255},
- { 18, 1, 120, 255, 255}
-);
-const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS(
- { 6, 1, 0, 255, 255},
- { 16, 1, 0, 255, 255}
-);
-const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS(
- { 2, 1, 240, 255, 255},
- { 17, 1, 250, 255, 255}
-);
-const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS(
- { 7, 1, 51, 255, 255},
- { 12, 1, 51, 255, 255}
-);
+const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS({8, 1, 120, 255, 255}, {18, 1, 120, 255, 255});
+const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS({6, 1, 0, 255, 255}, {16, 1, 0, 255, 255});
+const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS({2, 1, 240, 255, 255}, {17, 1, 250, 255, 255});
+const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS({7, 1, 51, 255, 255}, {12, 1, 51, 255, 255});
-const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
- shift_layers,
- control_layers,
- alt_layers,
- gui_layers
-);
+const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(shift_layers, control_layers, alt_layers, gui_layers);
-void keyboard_post_init_keymap(void) {
- rgblight_layers = my_rgb_layers;
-}
+void keyboard_post_init_keymap(void) { rgblight_layers = my_rgb_layers; }
void matrix_scan_keymap(void) {
- uint8_t mods = mod_config(get_mods()|get_oneshot_mods());
- rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT);
- rgblight_set_layer_state(1, mods & MOD_MASK_CTRL);
- rgblight_set_layer_state(2, mods & MOD_MASK_ALT);
- rgblight_set_layer_state(3, mods & MOD_MASK_GUI);
+ uint8_t mods = mod_config(get_mods() | get_oneshot_mods());
+ rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT);
+ rgblight_set_layer_state(1, mods & MOD_MASK_CTRL);
+ rgblight_set_layer_state(2, mods & MOD_MASK_ALT);
+ rgblight_set_layer_state(3, mods & MOD_MASK_GUI);
}
#endif
diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk
index 4036f91453..91d10f5dd2 100644
--- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk
+++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk
@@ -3,13 +3,15 @@ ENCODER_ENABLE = yes # ENables the use of one or more encoders
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
RGBLIGHT_STARTUP_ANIMATION = no
-BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover
-UNICODE_ENABLE = yes # Unicode
-BOOTLOADER = atmel-dfu
+UNICODE_ENABLE = no # Unicode
+KEY_LOCK_ENABLE = no
+
+BOOTLOADER = atmel-dfu
# TAP_DANCE_ENABLE = yes
diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
index d9e1f44e29..6e198e3ddd 100644
--- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c
+++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
@@ -22,6 +22,7 @@
extern haptic_config_t haptic_config;
#endif
+// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x3( /* Base */
KC_MUTE, TG(1), TG(2),
@@ -43,12 +44,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { { KC_DOWN, KC_UP } },
+ [1] = { { KC_VOLD, KC_VOLU } },
+ [2] = { { RGB_MOD, RGB_RMOD} },
+};
+#endif
+// clang-format on
-static bool is_asleep = false;
+static bool is_asleep = false;
static uint32_t oled_timer;
void render_oled_logo(void) {
- // clang-format off
+ // clang-format off
static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
@@ -68,9 +77,7 @@ void render_user_status(void) {
oled_write_P(nukem_good[0], haptic_config.enable);
}
-void keyboard_post_init_user(void) {
- oled_scroll_set_speed(0);
-}
+void keyboard_post_init_user(void) { oled_scroll_set_speed(0); }
void oled_task_user(void) {
if (is_asleep) {
@@ -107,13 +114,9 @@ void oled_task_user(void) {
}
}
-void suspend_power_down_user(void) {
- is_asleep = true;
-}
+void suspend_power_down_user(void) { is_asleep = true; }
-void suspend_wakeup_init_user(void) {
- is_asleep = false;
-}
+void suspend_wakeup_init_user(void) { is_asleep = false; }
bool process_record_user(uint16_t keycode, keyrecord_t* record) {
oled_timer = timer_read32();
@@ -121,7 +124,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
return true;
}
-
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code16(KC_VOLU);
diff --git a/keyboards/splitkb/zima/keymaps/drashna/rules.mk b/keyboards/splitkb/zima/keymaps/drashna/rules.mk
index b9a1f7f256..b9dc009159 100644
--- a/keyboards/splitkb/zima/keymaps/drashna/rules.mk
+++ b/keyboards/splitkb/zima/keymaps/drashna/rules.mk
@@ -1,2 +1,3 @@
# is intentional. won't compile under size, otherwise.
USER_NAME := not_drashna
+ENCODER_MAP_ENABLE = yes