summary refs log tree commit diff
path: root/keyboards/handwired/tractyl_manuform
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@drashna.net>2023-02-28 11:14:48 -0800
committerGitHub <noreply@github.com>2023-02-28 11:14:48 -0800
commit051401175d98e777a6633445a0275b54ed36e97a (patch)
tree325d717dfbfb12e4cb45c02089602f256ddc36d6 /keyboards/handwired/tractyl_manuform
parent05631b276d557824518cdb0c7d5d78c8f118891c (diff)
[Keymap] Drashna updates for 0.20.0 (#19960)
Diffstat (limited to 'keyboards/handwired/tractyl_manuform')
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
index afcc9b0a7a..4412130df8 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
@@ -130,25 +130,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
                                                      _______, _______,      KC_NUKE, _______
     ),
 };
-
+// clang-format on
 
 #ifdef ENCODER_ENABLE
-#ifdef ENCODER_MAP_ENABLE
+#    ifdef ENCODER_MAP_ENABLE
+// clang-format off
 const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
-    [_DEFAULT_LAYER_1] = { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } },
-    [_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   }, { _______, _______ } },
+    [_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
+    [_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+    [_DEFAULT_LAYER_3] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+    [_DEFAULT_LAYER_4] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+    [_GAMEPAD]         = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+    [_DIABLO]          = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+    [_MOUSE]           = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
+    [_MEDIA]           = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
+    [_RAISE]           = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) },
+    [_LOWER]           = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
+    [_ADJUST]          = { ENCODER_CCW_CW( CK_DOWN, CK_UP   ), ENCODER_CCW_CW( _______, _______ ) },
 };
 // clang-format on
-#else
+#    else
 
 deferred_token encoder_token  = INVALID_DEFERRED_TOKEN;
 static int8_t  last_direction = -1;
@@ -160,11 +161,11 @@ static uint32_t encoder_callback(uint32_t trigger_time, void *cb_arg) {
 }
 
 bool encoder_update_user(uint8_t index, bool clockwise) {
-#    ifdef SWAP_HANDS_ENABLE
+#        ifdef SWAP_HANDS_ENABLE
     if (swap_hands) {
         index ^= 1;
     }
-#    endif
+#        endif
     if (index == 0) {
         tap_code_delay(clockwise ? KC_VOLD : KC_VOLU, 5);
     } else if (index == 1) {
@@ -185,7 +186,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
     }
     return false;
 }
-#endif
+#    endif
 #endif
 
 #ifdef OLED_ENABLE
@@ -214,4 +215,8 @@ void oled_render_large_display(bool side) {
         render_unicode_mode(1, 14);
     }
 }
+
+void render_oled_title(bool side) {
+    oled_write_P(side ? PSTR("   Tractyl   ") : PSTR("   Manuform  "), true);
+}
 #endif