aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-02-23 10:57:24 -0800
committerGitHub <noreply@github.com>2021-02-23 10:57:24 -0800
commit0b69e4df818c2515cf4eee3d8b6fd4a07775b887 (patch)
treebdeee9c5a88c2aef8aca366b3e6ea986f44174c0 /keyboards
parent11146ecd086c6b6736ab3c5947f26a96be642671 (diff)
downloadqmk_firmware-0b69e4df818c2515cf4eee3d8b6fd4a07775b887.tar.gz
qmk_firmware-0b69e4df818c2515cf4eee3d8b6fd4a07775b887.zip
[Keymap] Drashna Updates - Split+OLED edition (#11968)
Diffstat (limited to 'keyboards')
-rwxr-xr-xkeyboards/c39/keymaps/drashna/keymap.c5
-rw-r--r--keyboards/gergo/keymaps/drashna/keymap.c5
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c6
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h1
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h7
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c66
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk2
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c57
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk4
-rw-r--r--keyboards/keebio/iris/keymaps/drashna/keymap.c5
-rw-r--r--keyboards/keebio/viterbi/keymaps/drashna/keymap.c18
-rw-r--r--keyboards/kyria/keymaps/drashna/config.h2
-rw-r--r--keyboards/kyria/keymaps/drashna/keymap.c9
-rw-r--r--keyboards/kyria/keymaps/drashna/rules.mk2
-rw-r--r--keyboards/moonlander/keymaps/drashna/keymap.c8
-rw-r--r--keyboards/orthodox/keymaps/drashna/keymap.c5
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/config.h32
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/keymap.c140
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/readme.md7
-rw-r--r--keyboards/splitkb/zima/keymaps/drashna/rules.mk2
20 files changed, 313 insertions, 70 deletions
diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c
index 3fd3ef35e..b5d11104d 100755
--- a/keyboards/c39/keymaps/drashna/keymap.c
+++ b/keyboards/c39/keymaps/drashna/keymap.c
@@ -24,14 +24,15 @@
24 * of use. K## is a placeholder to pass through the individual keycodes 24 * of use. K## is a placeholder to pass through the individual keycodes
25 */ 25 */
26// clang-format off 26// clang-format off
27#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
27#define LAYOUT_base( \ 28#define LAYOUT_base( \
28 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 29 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
29 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 30 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
30 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 31 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
31 ) \ 32 ) \
32 LAYOUT_wrapper( \ 33 LAYOUT_wrapper( \
33 KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \ 34 KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \
34 ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 35 ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(K1B), \
35 KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \ 36 KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \
36 ) 37 )
37#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__) 38#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__)
diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c
index 7258d350d..ecf5f3903 100644
--- a/keyboards/gergo/keymaps/drashna/keymap.c
+++ b/keyboards/gergo/keymaps/drashna/keymap.c
@@ -24,14 +24,15 @@
24 * of use. K## is a placeholder to pass through the individual keycodes 24 * of use. K## is a placeholder to pass through the individual keycodes
25 */ 25 */
26// clang-format off 26// clang-format off
27#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
27#define LAYOUT_gergo_base( \ 28#define LAYOUT_gergo_base( \
28 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 29 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
29 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 30 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
30 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 31 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
31 ) \ 32 ) \
32 LAYOUT_gergo_wrapper( \ 33 LAYOUT_gergo_wrapper( \
33 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \ 34 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
34 LALT_T(KC_TAB), K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 35 LALT_T(KC_TAB), K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(K1B), \
35 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ 36 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
36 KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ 37 KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \
37 ) 38 )
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c
index d931fd940..69f750095 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c
@@ -85,7 +85,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
85 85
86#ifdef POINTING_DEVICE_ENABLE 86#ifdef POINTING_DEVICE_ENABLE
87 if (keycode == DPI_CONFIG && record->event.pressed) { 87 if (keycode == DPI_CONFIG && record->event.pressed) {
88 keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; 88 if ((get_mods()|get_oneshot_mods()) & MOD_MASK_SHIFT) {
89 keyboard_config.dpi_config = (keyboard_config.dpi_config - 1) % DPI_OPTION_SIZE;
90 } else {
91 keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
92 }
89 eeconfig_update_kb(keyboard_config.raw); 93 eeconfig_update_kb(keyboard_config.raw);
90 trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); 94 trackball_set_cpi(dpi_array[keyboard_config.dpi_config]);
91 } 95 }
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h
index 6d89314a2..b9b27f0b7 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h
@@ -62,6 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
62#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 62#define BOOTMAGIC_LITE_COLUMN_RIGHT 5
63 63
64#define C6_AUDIO 64#define C6_AUDIO
65#define B7_AUDIO
65 66
66#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 67#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095
67#define DYNAMIC_KEYMAP_LAYER_COUNT 16 68#define DYNAMIC_KEYMAP_LAYER_COUNT 16
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h
index 73bf32b25..41b2e07c7 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h
@@ -18,9 +18,10 @@
18 18
19// #define USE_I2C 19// #define USE_I2C
20#define SELECT_SOFT_SERIAL_SPEED 0 20#define SELECT_SOFT_SERIAL_SPEED 0
21#define SERIAL_USE_MULTI_TRANSACTION 21// #define SERIAL_USE_MULTI_TRANSACTION
22 22#define SPLIT_MODS_ENABLE
23#define EE_HANDS 23#define EE_HANDS
24
24#define TRACKBALL_DPI_OPTIONS \ 25#define TRACKBALL_DPI_OPTIONS \
25 { 1200, 1800, 2600, 3400 } 26 { 1200, 1800, 2600, 3400 }
26 27
@@ -35,8 +36,6 @@
35#define SOLENOID_DEFAULT_DWELL 8 36#define SOLENOID_DEFAULT_DWELL 8
36 37
37#define OLED_DISPLAY_128X64 38#define OLED_DISPLAY_128X64
38#define OLED_TIMEOUT 0
39#define OLED_BRIGHTNESS 100 39#define OLED_BRIGHTNESS 100
40#define SPLIT_MODS_ENABLE
41 40
42#define MK_KINETIC_SPEED 41#define MK_KINETIC_SPEED
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c
index f8803edb9..5a1bb79fe 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c
@@ -16,24 +16,21 @@
16 16
17#include "drashna.h" 17#include "drashna.h"
18 18
19#define TG_DBLO TG(_DIABLO)
20
21
22// clang-format off 19// clang-format off
23#define LAYOUT_5x6_right_trackball_wrapper(...) LAYOUT_5x6_right_trackball(__VA_ARGS__) 20#define LAYOUT_5x6_right_trackball_wrapper(...) LAYOUT_5x6_right_trackball(__VA_ARGS__)
24#define LAYOUT_5x6_right_trackball_base( \ 21#define LAYOUT_5x6_right_trackball_base( \
25 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 22 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
26 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 23 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
27 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 24 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
28 ) \ 25 ) \
29 LAYOUT_5x6_right_trackball_wrapper( \ 26 LAYOUT_5x6_right_trackball_wrapper( \
30 KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ 27 KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
31 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ 28 SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
32 LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 29 LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
33 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ 30 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
34 OS_LALT, OS_LGUI, TG_GAME, TG_DBLO, \ 31 OS_LALT, OS_LGUI, TG_GAME, TG_DBLO, \
35 OS_LGUI, KC_GRV, OS_RGUI, \ 32 OS_LGUI, KC_GRV, OS_RGUI, \
36 KC_SPC, _______, KC_ENT, \ 33 KC_SPC, TT(_MOUSE), KC_ENT, \
37 BK_LWER, MO(_MOUSE), MO(_MOUSE), DL_RAIS \ 34 BK_LWER, MO(_MOUSE), MO(_MOUSE), DL_RAIS \
38 ) 35 )
39#define LAYOUT_5x6_right_trackball_base_wrapper(...) LAYOUT_5x6_right_trackball_base(__VA_ARGS__) 36#define LAYOUT_5x6_right_trackball_base_wrapper(...) LAYOUT_5x6_right_trackball_base(__VA_ARGS__)
@@ -149,13 +146,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
149 _______, _______, KC_NUKE, _______ 146 _______, _______, KC_NUKE, _______
150 ), 147 ),
151}; 148};
152// clang-format off 149// clang-format on
153
154 150
155#ifdef POINTING_DEVICE_ENABLE 151#ifdef POINTING_DEVICE_ENABLE
156static uint16_t mouse_timer = 0; 152static uint16_t mouse_timer = 0;
157static uint16_t mouse_debounce_timer = 0; 153static uint16_t mouse_debounce_timer = 0;
158static uint8_t mouse_keycode_tracker = 0; 154static uint8_t mouse_keycode_tracker = 0;
155bool tap_toggling = false;
159 156
160void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { 157void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
161 if ((x || y) && timer_elapsed(mouse_timer) > 125) { 158 if ((x || y) && timer_elapsed(mouse_timer) > 125) {
@@ -164,29 +161,64 @@ void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
164 layer_on(_MOUSE); 161 layer_on(_MOUSE);
165 } 162 }
166 } 163 }
167 if (timer_elapsed(mouse_debounce_timer) > 125 || layer_state_is(_GAMEPAD) ) { 164
165# ifdef TAPPING_TERM_PER_KEY
166 if (timer_elapsed(mouse_debounce_timer) > get_tapping_term(KC_BTN1, NULL)
167# else
168 if (timer_elapsed(mouse_debounce_timer) > TAPPING_TERM
169# endif
170 || layer_state_is(_GAMEPAD)) {
168 mouse_report->x = x; 171 mouse_report->x = x;
169 mouse_report->y = y; 172 mouse_report->y = y;
170 } 173 }
174# ifdef OLED_DRIVER_ENABLE
175 if (x || y) oled_timer = timer_read32();
176# endif
171} 177}
172 178
173void matrix_scan_keymap(void) { 179void matrix_scan_keymap(void) {
174 if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker) { 180 if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) {
175 layer_off(_MOUSE); 181 layer_off(_MOUSE);
176 } 182 }
183 if (tap_toggling) {
184 if (!layer_state_is(_MOUSE)) {
185 layer_on(_MOUSE);
186 }
187 }
177} 188}
178 189
179bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 190bool process_record_keymap(uint16_t keycode, keyrecord_t* record) {
180 switch(keycode){ 191 switch (keycode) {
192 case TT(_MOUSE): {
193 if (record->event.pressed) {
194 mouse_keycode_tracker++;
195 } else {
196# if TAPPING_TOGGLE != 0
197 if (record->tap.count == TAPPING_TOGGLE) {
198 tap_toggling ^= 1;
199# if TAPPING_TOGGLE == 1
200 if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1;
201# else
202 if (!tap_toggling) mouse_keycode_tracker -= record->tap.count;
203# endif
204 } else {
205 mouse_keycode_tracker--;
206 }
207# endif
208 }
209 mouse_timer = timer_read();
210 break;
211 }
181 case MO(_MOUSE): 212 case MO(_MOUSE):
182 case DPI_CONFIG: 213 case DPI_CONFIG:
183 case KC_MS_UP...KC_MS_WH_RIGHT: 214 case KC_MS_UP ... KC_MS_WH_RIGHT:
184 record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; 215 record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--;
185 mouse_timer = timer_read(); 216 mouse_timer = timer_read();
186 break; 217 break;
187 default: 218 default:
188 if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) { 219 if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) {
189 layer_off(_MOUSE); 220 layer_off(_MOUSE);
221 mouse_keycode_tracker = 0;
190 } 222 }
191 mouse_debounce_timer = timer_read(); 223 mouse_debounce_timer = timer_read();
192 break; 224 break;
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk
index be584e8c4..9999c0ddf 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk
@@ -5,5 +5,5 @@ AUDIO_ENABLE = yes
5TAP_DANCE_ENABLE = yes 5TAP_DANCE_ENABLE = yes
6UNICODE_ENABLE = yes 6UNICODE_ENABLE = yes
7OLED_DRIVER_ENABLE = yes 7OLED_DRIVER_ENABLE = yes
8 8WPM_ENABLE = yes
9# DEBOUNCE_TYPE = sym_eager_pk 9# DEBOUNCE_TYPE = sym_eager_pk
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c
index 20216a21d..5df90258b 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c
@@ -77,7 +77,8 @@ typedef struct _I2C_slave_buffer_t {
77 bool oled_on; 77 bool oled_on;
78 layer_state_t t_layer_state; 78 layer_state_t t_layer_state;
79 layer_state_t t_default_layer_state; 79 layer_state_t t_default_layer_state;
80} I2C_slave_buffer_t; 80 bool is_rgb_matrix_suspended;
81} __attribute__((packed)) I2C_slave_buffer_t;
81 82
82static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; 83static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
83 84
@@ -93,9 +94,10 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
93# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x) 94# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x)
94# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y) 95# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y)
95# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi) 96# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi)
96# define I2C_OLED_ON_START offsetof(I2C_slave_buffent, oled_on) 97# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on)
97# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffent, t_layer_state) 98# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state)
98# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffent, t_default_layer_state) 99# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state)
100# define I2C_RGB_MATRIX_SUSPEND_START offsetof(I2C_slave_buffer_t, is_rgb_matrix_suspended)
99 101
100# define TIMEOUT 100 102# define TIMEOUT 100
101 103
@@ -196,9 +198,19 @@ bool transport_master(matrix_row_t matrix[]) {
196 } 198 }
197 199
198# ifdef OLED_DRIVER_ENABLE 200# ifdef OLED_DRIVER_ENABLE
199 if (is_oled_on() != i2c_buffer->oled_on) { 201 bool is_oled_on = is_oled_on();
200 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on(), sizeof(bool), TIMEOUT) >= 0) { 202 if (is_oled_on != i2c_buffer->oled_on) {
201 i2c_buffer->oled_on = is_oled_on(); 203 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) {
204 i2c_buffer->oled_on = is_oled_on;
205 }
206 }
207# endif
208
209# ifdef RGB_MATRIX_ENABLE
210 bool sus_state = rgb_matrix_get_suspend_state();
211 if (sus_state != i2c_buffer->is_rgb_matrix_suspended) {
212 if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_SUSPEND_START, (void *)&sus_state, sizeof(sus_state), TIMEOUT) >= 0) {
213 i2c_buffer->is_rgb_matrix_suspended = sus_state;
202 } 214 }
203 } 215 }
204# endif 216# endif
@@ -255,10 +267,10 @@ void transport_slave(matrix_row_t matrix[]) {
255# endif 267# endif
256 268
257 if (layer_state != i2c_buffer->t_layer_state) { 269 if (layer_state != i2c_buffer->t_layer_state) {
258 layer_state_set(i2c_buffer->t_layer_state); 270 layer_state = i2c_buffer->t_layer_state;
259 } 271 }
260 if (default_layer_state != i2c_buffer->t_default_layer_state) { 272 if (default_layer_state != i2c_buffer->t_default_layer_state) {
261 default_layer_state_set(i2c_buffer->t_default_layer_state); 273 default_layer_state = i2c_buffer->t_default_layer_state;
262 } 274 }
263 275
264# ifdef OLED_DRIVER_ENABLE 276# ifdef OLED_DRIVER_ENABLE
@@ -268,6 +280,10 @@ void transport_slave(matrix_row_t matrix[]) {
268 oled_off(); 280 oled_off();
269 } 281 }
270# endif 282# endif
283
284# ifdef RGB_MATRIX_ENABLE
285 rgb_matrix_set_suspend_state(i2c_buffer->is_rgb_matrix_suspended);
286# endif
271} 287}
272 288
273void transport_master_init(void) { i2c_init(); } 289void transport_master_init(void) { i2c_init(); }
@@ -286,7 +302,7 @@ typedef struct _Serial_s2m_buffer_t {
286# endif 302# endif
287 int8_t mouse_x; 303 int8_t mouse_x;
288 int8_t mouse_y; 304 int8_t mouse_y;
289} Serial_s2m_buffer_t; 305} __attribute__((packed)) Serial_s2m_buffer_t;
290 306
291typedef struct _Serial_m2s_buffer_t { 307typedef struct _Serial_m2s_buffer_t {
292# ifdef SPLIT_MODS_ENABLE 308# ifdef SPLIT_MODS_ENABLE
@@ -309,7 +325,8 @@ typedef struct _Serial_m2s_buffer_t {
309 bool oled_on; 325 bool oled_on;
310 layer_state_t t_layer_state; 326 layer_state_t t_layer_state;
311 layer_state_t t_default_layer_state; 327 layer_state_t t_default_layer_state;
312} Serial_m2s_buffer_t; 328 bool is_rgb_matrix_suspended;
329} __attribute__((packed)) Serial_m2s_buffer_t;
313 330
314# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) 331# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
315// When MCUs on both sides drive their respective RGB LED chains, 332// When MCUs on both sides drive their respective RGB LED chains,
@@ -434,10 +451,14 @@ bool transport_master(matrix_row_t matrix[]) {
434 } 451 }
435# endif 452# endif
436 453
437 serial_m2s_buffer.t_layer_state = layer_state; 454 serial_m2s_buffer.t_layer_state = layer_state;
438 serial_m2s_buffer.t_default_layer_state = default_layer_state; 455 serial_m2s_buffer.t_default_layer_state = default_layer_state;
439# ifdef OLED_DRIVER_ENABLE 456# ifdef OLED_DRIVER_ENABLE
440 serial_m2s_buffer.oled_on = is_oled_on(); 457 serial_m2s_buffer.oled_on = is_oled_on();
458# endif
459
460# ifdef RGB_MATRIX_ENABLE
461 serial_m2s_buffer.is_rgb_matrix_suspended = rgb_matrix_get_suspend_state();
441# endif 462# endif
442 463
443 return true; 464 return true;
@@ -484,10 +505,10 @@ void transport_slave(matrix_row_t matrix[]) {
484# endif 505# endif
485 506
486 if (layer_state != serial_m2s_buffer.t_layer_state) { 507 if (layer_state != serial_m2s_buffer.t_layer_state) {
487 layer_state_set(serial_m2s_buffer.t_layer_state); 508 layer_state = serial_m2s_buffer.t_layer_state;
488 } 509 }
489 if (default_layer_state != serial_m2s_buffer.t_default_layer_state) { 510 if (default_layer_state != serial_m2s_buffer.t_default_layer_state) {
490 default_layer_set(serial_m2s_buffer.t_default_layer_state); 511 default_layer_state = serial_m2s_buffer.t_default_layer_state;
491 } 512 }
492# ifdef OLED_DRIVER_ENABLE 513# ifdef OLED_DRIVER_ENABLE
493 if (serial_m2s_buffer.oled_on) { 514 if (serial_m2s_buffer.oled_on) {
@@ -496,6 +517,10 @@ void transport_slave(matrix_row_t matrix[]) {
496 oled_off(); 517 oled_off();
497 } 518 }
498# endif 519# endif
520
521# ifdef RGB_MATRIX_ENABLE
522 rgb_matrix_set_suspend_state(serial_m2s_buffer.is_rgb_matrix_suspended);
523# endif
499} 524}
500 525
501#endif 526#endif
diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk
index 19b330cdc..99275c15a 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk
+++ b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk
@@ -26,5 +26,5 @@ POINTING_DEVICE_ENABLE = yes
26SPLIT_KEYBOARD = yes 26SPLIT_KEYBOARD = yes
27SPLIT_TRANSPORT = custom 27SPLIT_TRANSPORT = custom
28 28
29SRC += pointer_transport.c pmw3360.c 29SRC += pmw3360.c
30QUANTUM_LIB_SRC += serial.c i2c_master.c i2c_slave.c spi_master.c 30QUANTUM_LIB_SRC += pointer_transport.c serial.c i2c_master.c i2c_slave.c spi_master.c
diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c
index bc34ba822..1dc6f0e52 100644
--- a/keyboards/keebio/iris/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c
@@ -25,15 +25,16 @@
25 */ 25 */
26 26
27// clang-format off 27// clang-format off
28#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
28#define LAYOUT_iris_base( \ 29#define LAYOUT_iris_base( \
29 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 30 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
30 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 31 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
31 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 32 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
32 ) \ 33 ) \
33 LAYOUT_wrapper( \ 34 LAYOUT_wrapper( \
34 KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ 35 KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
35 LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ 36 LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
36 KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 37 KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
37 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ 38 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
38 KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ 39 KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \
39 ) 40 )
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
index 99e06b4de..0c4563e63 100644
--- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
@@ -17,9 +17,7 @@
17#include "drashna.h" 17#include "drashna.h"
18 18
19// Fillers to make layering more clear 19// Fillers to make layering more clear
20#define DIABLO TG(_DIABLO) 20#define TT_MDIA TT(_MEDIA)
21#define GAMEPAD TG(_GAMEPAD)
22#define MEDIA TT(_MEDIA)
23 21
24// enum more_custom_keycodes { 22// enum more_custom_keycodes {
25// KC_P00 = NEW_SAFE_RANGE 23// KC_P00 = NEW_SAFE_RANGE
@@ -29,15 +27,15 @@
29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30 28
31 [_NUMLOCK] = LAYOUT_ortho_5x7( 29 [_NUMLOCK] = LAYOUT_ortho_5x7(
32 KC_NO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, 30 KC_NO, TG_DBLO, TG_GAME, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS,
33 MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, 31 TT_MDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST,
34 KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, 32 KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS,
35 KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, 33 KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS,
36 KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT 34 KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT
37 ), 35 ),
38 36
39 [_DIABLO] = LAYOUT_ortho_5x7( 37 [_DIABLO] = LAYOUT_ortho_5x7(
40 KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L, 38 KC_ESC, _______, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L,
41 KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J, 39 KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J,
42 KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F, 40 KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F,
43 KC_LCTL, KC_D3_3, KC_D3_3, KC_D3_3, KC_D3_3, KC_Z, KC_DIABLO_CLEAR, 41 KC_LCTL, KC_D3_3, KC_D3_3, KC_D3_3, KC_D3_3, KC_Z, KC_DIABLO_CLEAR,
@@ -45,16 +43,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
45 ), 43 ),
46 44
47 [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch 45 [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch
48 KC_NO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, 46 KC_NO, KC_ESC, _______, KC_1, KC_2, KC_3, KC_4,
49 MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, 47 TT_MDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
50 KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, 48 KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
51 KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, 49 KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
52 KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V 50 KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V
53 ), 51 ),
54 52
55 [_MEDIA] = LAYOUT_ortho_5x7( 53 [_MEDIA] = LAYOUT_ortho_5x7(
56 KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, 54 KC_MAKE, RESET, MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
57 MEDIA, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, 55 _______, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI,
58 RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD, 56 RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD,
59 KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI, 57 KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI,
60 KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI 58 KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI
diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h
index d5fcf9088..afd17b436 100644
--- a/keyboards/kyria/keymaps/drashna/config.h
+++ b/keyboards/kyria/keymaps/drashna/config.h
@@ -20,8 +20,6 @@
20 20
21#ifdef OLED_DRIVER_ENABLE 21#ifdef OLED_DRIVER_ENABLE
22# define OLED_DISPLAY_128X64 22# define OLED_DISPLAY_128X64
23# define OLED_FONT_H "font_gmk_bad.h"
24# define OLED_DISABLE_TIMEOUT
25# define OLED_SCROLL_TIMEOUT_RIGHT 60000 23# define OLED_SCROLL_TIMEOUT_RIGHT 60000
26#endif 24#endif
27 25
diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c
index 08f32812e..ba1b03888 100644
--- a/keyboards/kyria/keymaps/drashna/keymap.c
+++ b/keyboards/kyria/keymaps/drashna/keymap.c
@@ -31,15 +31,16 @@ uint8_t is_master;
31 */ 31 */
32 32
33// clang-format off 33// clang-format off
34#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
34#define LAYOUT_kyria_base( \ 35#define LAYOUT_kyria_base( \
35 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 36 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
36 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 37 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
37 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 38 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
38 ) \ 39 ) \
39 LAYOUT_wrapper( \ 40 LAYOUT_wrapper( \
40 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ 41 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
41 LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 42 LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
42 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), MEH(KC_MINS), TG(_DIABLO), KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ 43 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG_GAME, MEH(KC_MINS), TG_DBLO, KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
43 KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ 44 KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \
44 ) 45 )
45/* Re-pass though to allow templates to be used */ 46/* Re-pass though to allow templates to be used */
@@ -112,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
112 [_DIABLO] = LAYOUT_wrapper( 113 [_DIABLO] = LAYOUT_wrapper(
113 KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, 114 KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
114 KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 115 KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
115 KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG(_DIABLO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 116 KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG_DBLO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
116 KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO 117 KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
117 ), 118 ),
118 [_LOWER] = LAYOUT_wrapper( 119 [_LOWER] = LAYOUT_wrapper(
diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk
index 756c044fa..7a6a86e9f 100644
--- a/keyboards/kyria/keymaps/drashna/rules.mk
+++ b/keyboards/kyria/keymaps/drashna/rules.mk
@@ -1,7 +1,7 @@
1OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays 1OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
2ENCODER_ENABLE = yes # ENables the use of one or more encoders 2ENCODER_ENABLE = yes # ENables the use of one or more encoders
3RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow 3RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
4RGBLIGHT_STARTUP_ANIMATION = yes 4RGBLIGHT_STARTUP_ANIMATION = no
5 5
6BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration 6BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
7MOUSEKEY_ENABLE = no # Mouse keys 7MOUSEKEY_ENABLE = no # Mouse keys
diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c
index a12be12ea..57c69df48 100644
--- a/keyboards/moonlander/keymaps/drashna/keymap.c
+++ b/keyboards/moonlander/keymaps/drashna/keymap.c
@@ -27,13 +27,13 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
27 27
28#define LAYOUT_moonlander_base( \ 28#define LAYOUT_moonlander_base( \
29 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 29 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
30 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 30 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
31 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 31 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
32 ) \ 32 ) \
33 LAYOUT_moonlander_wrapper( \ 33 LAYOUT_moonlander_wrapper( \
34 KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ 34 KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
35 KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO),TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ 35 KC_TAB, K01, K02, K03, K04, K05, TG_DBLO,TG_DBLO, K06, K07, K08, K09, K0A, KC_BSLS, \
36 KC_C1R3, K11, K12, K13, K14, K15, TG(_GAMEPAD),TG(_GAMEPAD), K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 36 KC_C1R3, K11, K12, K13, K14, K15, TG_GAME,TG_GAME, K16, K17, K18, K19, K1A, RALT_T(K1B), \
37 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A),KC_MRSF, \ 37 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A),KC_MRSF, \
38 KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_NO, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ 38 KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_NO, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
39 KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT \ 39 KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT \
@@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
105 [_GAMEPAD] = LAYOUT_moonlander_wrapper( 105 [_GAMEPAD] = LAYOUT_moonlander_wrapper(
106 KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, 106 KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
107 KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 107 KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
108 KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_TRNS, TG(_GAMEPAD), KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, 108 KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_TRNS, TG_GAME, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
109 KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, 109 KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
110 KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, 110 KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO,
111 KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM 111 KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM
diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c
index 2dbe18634..32b0dcfeb 100644
--- a/keyboards/orthodox/keymaps/drashna/keymap.c
+++ b/keyboards/orthodox/keymaps/drashna/keymap.c
@@ -8,14 +8,15 @@
8 * of use. K## is a placeholder to pass through the individual keycodes 8 * of use. K## is a placeholder to pass through the individual keycodes
9 */ 9 */
10// clang-format off 10// clang-format off
11#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
11#define LAYOUT_orthodox_base( \ 12#define LAYOUT_orthodox_base( \
12 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 13 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
13 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 14 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
14 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 15 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
15 ) \ 16 ) \
16 LAYOUT_wrapper( \ 17 LAYOUT_wrapper( \
17 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ 18 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
18 LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 19 LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(K1B), \
19 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \ 20 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \
20 ) 21 )
21#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) 22#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__)
diff --git a/keyboards/splitkb/zima/keymaps/drashna/config.h b/keyboards/splitkb/zima/keymaps/drashna/config.h
new file mode 100644
index 000000000..91d657eda
--- /dev/null
+++ b/keyboards/splitkb/zima/keymaps/drashna/config.h
@@ -0,0 +1,32 @@
1/* Copyright 2019 Thomas Baart
2 * Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#define OLED_FONT_H "users/drashna/drashna_font.h"
21#define OLED_UPDATE_INTERVAL 15
22#define OLED_DISABLE_TIMEOUT
23#define OLED_FONT_END 255
24// # define OLED_FONT_5X5
25// # define OLED_FONT_AZTECH
26// # define OLED_FONT_BMPLAIN
27# define OLED_FONT_SUPER_DIGG
28// # define OLED_LOGO_GMK_BAD
29// # define OLED_LOGO_HUE_MANITEE
30// # define OLED_LOGO_CORNE
31// # define OLED_LOGO_GOTHAM
32#define OLED_LOGO_SCIFI
diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
new file mode 100644
index 000000000..9d3919ee2
--- /dev/null
+++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
@@ -0,0 +1,140 @@
1/* Copyright 2019 Thomas Baart
2 * Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#include QMK_KEYBOARD_H
18#include <stdio.h>
19
20#ifdef HAPTIC_ENABLE
21# include "haptic.h"
22extern haptic_config_t haptic_config;
23#endif
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 [0] = LAYOUT_ortho_4x3( /* Base */
27 KC_MUTE, TG(1), TG(2),
28 KC_P7, KC_P8, KC_P9,
29 KC_P4, KC_P5, KC_P6,
30 KC_P1, KC_P2, KC_P3
31 ),
32 [1] = LAYOUT_ortho_4x3( /* Layer 1 */
33 RESET, _______, XXXXXXX,
34 AU_ON, AU_OFF, XXXXXXX,
35 CK_TOGG, XXXXXXX, CK_UP,
36 CK_RST, XXXXXXX, CK_DOWN
37 ),
38 [2] = LAYOUT_ortho_4x3( /* Layer 2*/
39 RGB_TOG, RGB_MOD, _______,
40 RGB_HUI, RGB_SAI, RGB_VAI,
41 RGB_HUD, RGB_SAD, RGB_VAD,
42 HPT_TOG, HPT_FBK, HPT_CONT
43 )
44};
45
46
47static bool is_asleep = false;
48static uint32_t oled_timer;
49
50void render_oled_logo(void) {
51 // clang-format off
52 static const char PROGMEM qmk_logo[] = {
53 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
54 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
55 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
56 // clang-format on
57 oled_write_ln_P(qmk_logo, false);
58}
59
60void render_user_status(void) {
61 static const char PROGMEM audio_status[2][3] = {{0xE0, 0xE1, 0}, {0xE2, 0xE3, 0}};
62 oled_write_P(audio_status[is_audio_on()], false);
63 static const char PROGMEM audio_clicky_status[2][3] = {{0xF4, 0xF5, 0}, {0xF6, 0xF7, 0}};
64 oled_write_P(audio_clicky_status[is_clicky_on() && is_audio_on()], false);
65 static const char PROGMEM rgb_layer_status[2][3] = {{0xEE, 0xEF, 0}, {0xF0, 0xF1, 0}};
66 oled_write_P(rgb_layer_status[rgblight_is_enabled()], false);
67 static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}};
68 oled_write_P(nukem_good[0], haptic_config.enable);
69}
70
71void keyboard_post_init_user(void) {
72 oled_scroll_set_speed(0);
73}
74
75void oled_task_user(void) {
76 if (is_asleep) {
77 oled_off();
78 return;
79 }
80
81 if (timer_elapsed32(oled_timer) < 30000) {
82 oled_on();
83 oled_scroll_off();
84 oled_write_P(PSTR("SplitKB's Zima"), false);
85 char layer[2] = {0};
86 snprintf(layer, sizeof(layer), "%d", get_highest_layer(layer_state));
87 oled_write_P(PSTR(" L:"), false);
88 oled_write_ln(layer, false);
89 oled_write_ln_P(PSTR("--------------"), false);
90 if (rgblight_is_enabled()) {
91 oled_write_P(PSTR("HSV: "), false);
92 char rgbs[14];
93 snprintf(rgbs, sizeof(rgbs), "%3d, %3d, %3d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
94 oled_write_ln(rgbs, false);
95 } else {
96 oled_write_ln_P(PSTR("RGB LIGHT DISABLED"), false);
97 }
98 render_user_status();
99 } else {
100 if (timer_elapsed32(oled_timer) < 120000) {
101 oled_on();
102 render_oled_logo();
103 oled_scroll_right();
104 } else {
105 oled_off();
106 }
107 }
108}
109
110void suspend_power_down_user(void) {
111 is_asleep = true;
112}
113
114void suspend_wakeup_init_user(void) {
115 is_asleep = false;
116}
117
118bool process_record_user(uint16_t keycode, keyrecord_t* record) {
119 oled_timer = timer_read32();
120
121 return true;
122}
123
124
125 void encoder_update_user(uint8_t index, bool clockwise) {
126 if (clockwise) {
127 tap_code16(KC_VOLU);
128 } else {
129 tap_code16(KC_VOLD);
130 }
131# ifdef OLED_DRIVER_ENABLE
132 oled_timer = timer_read32();
133# endif
134# if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY)
135 if (is_audio_on() && is_clicky_on()) clicky_play();
136# endif
137# ifdef HAPTIC_ENABLE
138 if (haptic_config.enable) haptic_play();
139# endif
140}
diff --git a/keyboards/splitkb/zima/keymaps/drashna/readme.md b/keyboards/splitkb/zima/keymaps/drashna/readme.md
new file mode 100644
index 000000000..0f78f4bf1
--- /dev/null
+++ b/keyboards/splitkb/zima/keymaps/drashna/readme.md
@@ -0,0 +1,7 @@
1# The default keymap for zima
2
3This includes support for the OLED and Encoder. However, the actual code is found in the `zima.c` file. This can be replaced by adding your own `oled_task_user(void)` and `encoder_update_user` functinons. These will replace what is in the keyboard, and allow you to customize these features.
4
5The reason that this is done this way, is so that this functionality will work on the [QMK Configurator](https://config.qmk.fm/#/splitkb/zima/LAYOUT_ortho_4x3)
6
7For reference, the code used for the oled and encoder defaults is in [zima.c](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/zima/zima.c).
diff --git a/keyboards/splitkb/zima/keymaps/drashna/rules.mk b/keyboards/splitkb/zima/keymaps/drashna/rules.mk
new file mode 100644
index 000000000..b9a1f7f25
--- /dev/null
+++ b/keyboards/splitkb/zima/keymaps/drashna/rules.mk
@@ -0,0 +1,2 @@
1# is intentional. won't compile under size, otherwise.
2USER_NAME := not_drashna