aboutsummaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-01-30 13:20:33 -0800
committerGitHub <noreply@github.com>2022-01-30 13:20:33 -0800
commit941b1d35b8e40a9c93301a1131ef3f3336fee0b5 (patch)
tree54c8d1ec131d5c8a6e0dd89364a9840b3925fcdd /keyboards/handwired
parent3555ee0555c8a9ff8aea2a101ae02a72b0e76076 (diff)
downloadqmk_firmware-941b1d35b8e40a9c93301a1131ef3f3336fee0b5.tar.gz
qmk_firmware-941b1d35b8e40a9c93301a1131ef3f3336fee0b5.zip
[Keymap] Add oled improvements and cnano keymap for drashna (#16133)
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h4
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c52
2 files changed, 49 insertions, 7 deletions
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
index 0b33138ec..c3a30d2bc 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
@@ -16,9 +16,7 @@
16 16
17#pragma once 17#pragma once
18 18
19#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 } 19#define DEBOUNCE 45
20
21#define DEBOUNCE 60
22#define ENCODER_DEFAULT_POS 0x3 20#define ENCODER_DEFAULT_POS 0x3
23 21
24#ifdef OLED_DRIVER_SH1107 22#ifdef OLED_DRIVER_SH1107
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 b5310b37d..fa1e8897e 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
@@ -60,9 +60,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
60 ), 60 ),
61 61
62 [_MOUSE] = LAYOUT_5x6_right( 62 [_MOUSE] = LAYOUT_5x6_right(
63 _______, _______, _______, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______, 63 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
64 _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, 64 _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______,
65 _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, 65 _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, DPI_CONFIG,
66 _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, 66 _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______,
67 _______, _______, _______, _______, 67 _______, _______, _______, _______,
68 _______, _______, KC_BTN3, 68 _______, _______, KC_BTN3,
@@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
70 _______, _______, _______, _______ 70 _______, _______, _______, _______
71 ), 71 ),
72 [_GAMEPAD] = LAYOUT_5x6_right( 72 [_GAMEPAD] = LAYOUT_5x6_right(
73 KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, DPI_CONFIG, _______, _______, _______, _______, _______, 73 KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, _______, _______, _______, _______, _______, _______,
74 KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, 74 KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______,
75 KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, 75 KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______,
76 KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______, 76 KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______,
@@ -145,7 +145,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
145 [_MEDIA] = { { _______, _______ }, { _______, _______ } }, 145 [_MEDIA] = { { _______, _______ }, { _______, _______ } },
146 [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } }, 146 [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
147 [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } }, 147 [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
148 [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _F______ } }, 148 [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
149}; 149};
150// clang-format on 150// clang-format on
151#else 151#else
@@ -165,5 +165,49 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
165#endif 165#endif
166 166
167#ifdef OLED_ENABLE 167#ifdef OLED_ENABLE
168extern uint16_t typing_mode;
169
168oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_180; } 170oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_180; }
171
172void oled_render_large_display(void) {
173 if (is_keyboard_left()) {
174 render_wpm_graph(54, 64);
175 } else {
176 oled_advance_page(true);
177 oled_advance_page(true);
178
179 static const char PROGMEM logo[] = {
180 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
181 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
182 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
183 };
184 oled_write_P(logo, false);
185
186 oled_set_cursor(1, 14);
187 oled_write_ln_P(PSTR("Unicode:"), false);
188 switch (typing_mode) {
189 case KC_WIDE:
190 oled_write_P(PSTR(" Wide"), false);
191 break;
192 case KC_SCRIPT:
193 oled_write_P(PSTR(" Script"), false);
194 break;
195 case KC_BLOCKS:
196 oled_write_P(PSTR(" Blocks"), false);
197 break;
198 case KC_REGIONAL:
199 oled_write_P(PSTR(" Regional"), false);
200 break;
201 case KC_AUSSIE:
202 oled_write_P(PSTR(" Aussie"), false);
203 break;
204 case KC_ZALGO:
205 oled_write_P(PSTR(" Zalgo"), false);
206 break;
207 default:
208 oled_write_P(PSTR(" Normal"), false);
209 break;
210 }
211 }
212}
169#endif 213#endif