aboutsummaryrefslogtreecommitdiff
path: root/layouts/community
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community')
-rw-r--r--layouts/community/ergodox/drashna/config.h15
-rw-r--r--layouts/community/ergodox/drashna/keymap.c33
-rw-r--r--layouts/community/ergodox/drashna/rules.mk4
-rw-r--r--layouts/community/numpad_5x6/drashna/config.h20
-rw-r--r--layouts/community/numpad_5x6/drashna/keymap.c1
-rw-r--r--layouts/community/ortho_4x12/drashna/config.h37
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c81
-rw-r--r--layouts/community/ortho_4x12/drashna/rules.mk60
-rw-r--r--layouts/community/ortho_5x12/drashna/keymap.c32
-rw-r--r--layouts/community/ortho_5x12/drashna/rules.mk18
10 files changed, 150 insertions, 151 deletions
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h
index 494383299..0091ebcde 100644
--- a/layouts/community/ergodox/drashna/config.h
+++ b/layouts/community/ergodox/drashna/config.h
@@ -1,18 +1,19 @@
1#pragma once 1#pragma once
2 2
3#ifdef RGBLIGHT_ENABLE 3#ifdef RGBLIGHT_ENABLE
4# undef RGBLIGHT_SAT_STEP 4# undef RGBLIGHT_SAT_STEP
5# define RGBLIGHT_SAT_STEP 12 5# define RGBLIGHT_SAT_STEP 12
6
7# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
8# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
9#endif // RGBLIGHT_ENABLE
10 6
7# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
8# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
9#endif // RGBLIGHT_ENABLE
11 10
12#undef PRODUCT 11#undef PRODUCT
13#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine 12#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine
14 13
15#undef DEBOUNCE 14#undef DEBOUNCE
16#define DEBOUNCE 30 15#define DEBOUNCE 30
17 16
18#define TAPPING_TERM_PER_KEY 17#define TAPPING_TERM_PER_KEY
18
19#define ERGODOX_LED_30
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 6ed4558e2..8308bfdaa 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -1,20 +1,3 @@
1/*
2This is the keymap for the keyboard
3Copyright 2012 Jun Wako <wakojun@gmail.com>
4Copyright 2015 Jack Humbert
5Copyright 2017 Art Ortenburger
6This program is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include QMK_KEYBOARD_H
18#include "drashna.h" 1#include "drashna.h"
19 2
20#ifdef UNICODEMAP_ENABLE 3#ifdef UNICODEMAP_ENABLE
@@ -32,6 +15,13 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
32// define layer change stuff for underglow indicator 15// define layer change stuff for underglow indicator
33bool skip_leds = false; 16bool skip_leds = false;
34 17
18/*
19 * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of
20 * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak,
21 * etc), so that there is no need to set them up for each layout, and modify
22 * all of them if I want to change them. This helps to keep consistency and
23 * ease of use. K## is a placeholder to pass through the individual keycodes
24 */
35// clang-format off 25// clang-format off
36#define LAYOUT_ergodox_pretty_base( \ 26#define LAYOUT_ergodox_pretty_base( \
37 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 27 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
@@ -40,8 +30,8 @@ bool skip_leds = false;
40 ) \ 30 ) \
41 LAYOUT_ergodox_pretty_wrapper( \ 31 LAYOUT_ergodox_pretty_wrapper( \
42 KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ 32 KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
43 KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ 33 LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
44 KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 34 KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
45 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ 35 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
46 KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ 36 KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
47 OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ 37 OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
@@ -402,7 +392,7 @@ void rgb_matrix_indicators_user(void) {
402 rgb_matrix_config.enable 392 rgb_matrix_config.enable
403# endif 393# endif
404 ) { 394 ) {
405 switch (biton32(layer_state)) { 395 switch (get_highest_layer(layer_state)) {
406 case _GAMEPAD: 396 case _GAMEPAD:
407 rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 397 rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
408 rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q 398 rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
@@ -432,7 +422,7 @@ void rgb_matrix_indicators_user(void) {
432 break; 422 break;
433 default: { 423 default: {
434 bool mods_enabled = IS_LAYER_ON(_MODS); 424 bool mods_enabled = IS_LAYER_ON(_MODS);
435 switch (biton32(default_layer_state)) { 425 switch (get_highest_layer(default_layer_state)) {
436 case _QWERTY: 426 case _QWERTY:
437 rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 427 rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
438 break; 428 break;
@@ -466,7 +456,6 @@ void rgb_matrix_indicators_user(void) {
466 456
467#endif // RGB_MATRIX_INIT 457#endif // RGB_MATRIX_INIT
468 458
469
470uint16_t get_tapping_term(uint16_t keycode) { 459uint16_t get_tapping_term(uint16_t keycode) {
471 if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { 460 if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) {
472 if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { 461 if (mod_config(keycode & 0xf) & MOD_MASK_ALT) {
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk
index f9f9ea2ba..3aee59df6 100644
--- a/layouts/community/ergodox/drashna/rules.mk
+++ b/layouts/community/ergodox/drashna/rules.mk
@@ -3,8 +3,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
3COMMAND_ENABLE = no # Commands for debug and configuration 3COMMAND_ENABLE = no # Commands for debug and configuration
4SPACE_CADET_ENABLE = no 4SPACE_CADET_ENABLE = no
5ifeq ($(strip $(KEYBOARD)), ergodox_ez) 5ifeq ($(strip $(KEYBOARD)), ergodox_ez)
6 RGBLIGHT_ENABLE = yes 6 RGBLIGHT_ENABLE = yes
7 RGB_MATRIX_ENABLE = no 7 RGB_MATRIX_ENABLE = no
8endif 8endif
9CONSOLE_ENABLE = no 9CONSOLE_ENABLE = no
10BOOTMAGIC_ENABLE = yes 10BOOTMAGIC_ENABLE = yes
diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h
index 2fc5ab658..29045148e 100644
--- a/layouts/community/numpad_5x6/drashna/config.h
+++ b/layouts/community/numpad_5x6/drashna/config.h
@@ -3,17 +3,17 @@
3// #define B6_AUDIO 3// #define B6_AUDIO
4 4
5#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) 5#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
6# define RGB_DI_PIN B1 6# define RGB_DI_PIN B1
7# define RGBLED_NUM 16 // Number of LEDs 7# define RGBLED_NUM 16 // Number of LEDs
8 8
9# define RGBLIGHT_HUE_STEP 12 9# define RGBLIGHT_HUE_STEP 12
10# define RGBLIGHT_SAT_STEP 12 10# define RGBLIGHT_SAT_STEP 12
11# define RGBLIGHT_VAL_STEP 12 11# define RGBLIGHT_VAL_STEP 12
12# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 12# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
13# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 13# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
14#endif // RGBLIGHT_ENABLE 14#endif // RGBLIGHT_ENABLE
15 15
16#if defined(KEYBOARD_primekb_prime_m) 16#if defined(KEYBOARD_primekb_prime_m)
17# undef PRODUCT 17# undef PRODUCT
18# define PRODUCT Drashna Hacked Prime_M Macro Pad 18# define PRODUCT Drashna Hacked Prime_M Macro Pad
19#endif 19#endif
diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c
index 81710221d..3d325a4c1 100644
--- a/layouts/community/numpad_5x6/drashna/keymap.c
+++ b/layouts/community/numpad_5x6/drashna/keymap.c
@@ -1,4 +1,3 @@
1#include QMK_KEYBOARD_H
2#include "drashna.h" 1#include "drashna.h"
3 2
4#define F2_MCRO LT(_GAMEPAD, KC_F2) 3#define F2_MCRO LT(_GAMEPAD, KC_F2)
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index d8ac5e6d1..663708afa 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -1,9 +1,10 @@
1#pragma once 1#pragma once
2 2
3#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) 3#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
4# define RGB_DI_PIN A0 4# if defined(KEYBOARD_planck_light)
5# define RGBLED_NUM 13 // Number of LEDs 5# define RGB_DI_PIN A0
6# define RGBLIGHT_ANIMATIONS 6# define RGBLED_NUM 13 // Number of LEDs
7# endif
7# define RGBLIGHT_HUE_STEP 12 8# define RGBLIGHT_HUE_STEP 12
8# define RGBLIGHT_SAT_STEP 12 9# define RGBLIGHT_SAT_STEP 12
9# define RGBLIGHT_VAL_STEP 12 10# define RGBLIGHT_VAL_STEP 12
@@ -23,6 +24,9 @@
23# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended 24# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
24# undef RGB_MATRIX_LED_PROCESS_LIMIT 25# undef RGB_MATRIX_LED_PROCESS_LIMIT
25# undef RGB_MATRIX_LED_FLUSH_LIMIT 26# undef RGB_MATRIX_LED_FLUSH_LIMIT
27# ifdef KEYBOARD_planck_rev6
28# define DRIVER_LED_TOTAL RGBLED_NUM
29# endif
26#endif 30#endif
27 31
28#if defined(KEYBOARD_lets_split_rev2) 32#if defined(KEYBOARD_lets_split_rev2)
@@ -34,7 +38,7 @@
34#if !defined(KEYBOARD_planck_light) 38#if !defined(KEYBOARD_planck_light)
35# ifdef RGBLIGHT_ENABLE 39# ifdef RGBLIGHT_ENABLE
36# define NO_MUSIC_MODE 40# define NO_MUSIC_MODE
37# endif // RGBLIGHT_ENABLE 41# endif // RGBLIGHT_ENABLE
38#else 42#else
39# undef QMK_ESC_OUTPUT 43# undef QMK_ESC_OUTPUT
40# define QMK_ESC_OUTPUT E6 // usually COL 44# define QMK_ESC_OUTPUT E6 // usually COL
@@ -45,7 +49,7 @@
45# undef QMK_SPEAKER 49# undef QMK_SPEAKER
46# define QMK_SPEAKER B5 50# define QMK_SPEAKER B5
47# define SOLENOID_PIN A1 51# define SOLENOID_PIN A1
48#endif // KEYBOARD_planck_light 52#endif // KEYBOARD_planck_light
49 53
50#if defined(KEYBOARD_planck) 54#if defined(KEYBOARD_planck)
51# undef PRODUCT 55# undef PRODUCT
@@ -58,6 +62,7 @@
58# endif 62# endif
59#endif 63#endif
60 64
65#define ENCODER_DIRECTION_FLIP
61/* 66/*
62 * MIDI options 67 * MIDI options
63 */ 68 */
@@ -82,26 +87,26 @@
82/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 87/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
83//#define MIDI_TONE_KEYCODE_OCTAVES 2 88//#define MIDI_TONE_KEYCODE_OCTAVES 2
84 89
85#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ 90#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
86#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 91#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
87#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 92#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
88 93
89/* default 3V ERM vibration motor voltage and library*/ 94/* default 3V ERM vibration motor voltage and library*/
90#if FB_ERM_LRA == 0 95#if FB_ERM_LRA == 0
91#define RATED_VOLTAGE 3 96# define RATED_VOLTAGE 3
92#define V_RMS 2.3 97# define V_RMS 2.3
93#define V_PEAK 3.30 98# define V_PEAK 3.30
94/* Library Selection */ 99/* Library Selection */
95#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 100# define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
96 101
97/* default 2V LRA voltage and library */ 102/* default 2V LRA voltage and library */
98#elif FB_ERM_LRA == 1 103#elif FB_ERM_LRA == 1
99#define RATED_VOLTAGE 2 104# define RATED_VOLTAGE 2
100#define V_RMS 2.0 105# define V_RMS 2.0
101#define V_PEAK 2.85 106# define V_PEAK 2.85
102#define F_LRA 200 107# define F_LRA 200
103/* Library Selection */ 108/* Library Selection */
104#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 109# define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
105 110
106#endif 111#endif
107 112
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 1c894c764..c3899cd03 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -1,20 +1,3 @@
1/* Copyright 2015-2017 Jack Humbert
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18#include "drashna.h" 1#include "drashna.h"
19 2
20#ifdef RGBLIGHT_ENABLE 3#ifdef RGBLIGHT_ENABLE
@@ -46,6 +29,13 @@ enum planck_keycodes {
46# define PLNK_4 ET_RAIS 29# define PLNK_4 ET_RAIS
47#endif 30#endif
48 31
32/*
33 * The `LAYOUT_ortho_4x12_base` macro is a template to allow the use of identical
34 * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
35 * that there is no need to set them up for each layout, and modify all of
36 * them if I want to change them. This helps to keep consistency and ease
37 * of use. K## is a placeholder to pass through the individual keycodes
38 */
49// clang-format off 39// clang-format off
50#define LAYOUT_ortho_4x12_base( \ 40#define LAYOUT_ortho_4x12_base( \
51 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 41 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
@@ -54,7 +44,7 @@ enum planck_keycodes {
54 ) \ 44 ) \
55 LAYOUT_ortho_4x12_wrapper( \ 45 LAYOUT_ortho_4x12_wrapper( \
56 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \ 46 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \
57 KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 47 LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
58 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ 48 KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
59 BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ 49 BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
60 ) 50 )
@@ -159,14 +149,14 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
159#ifdef KEYBOARD_planck_ez 149#ifdef KEYBOARD_planck_ez
160 case TH_LVL: 150 case TH_LVL:
161 if (record->event.pressed) { 151 if (record->event.pressed) {
162 keyboard_config.led_level++; 152 keyboard_config.led_level++;
163 if (keyboard_config.led_level > 4) { 153 if (keyboard_config.led_level > 4) {
164 keyboard_config.led_level = 0; 154 keyboard_config.led_level = 0;
165 } 155 }
166 planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); 156 planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4);
167 planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); 157 planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4);
168 eeconfig_update_kb(keyboard_config.raw); 158 eeconfig_update_kb(keyboard_config.raw);
169 layer_state_set_kb(layer_state); 159 layer_state_set_kb(layer_state);
170 } 160 }
171 break; 161 break;
172#endif 162#endif
@@ -190,6 +180,31 @@ bool music_mask_user(uint16_t keycode) {
190 180
191#ifdef RGB_MATRIX_ENABLE 181#ifdef RGB_MATRIX_ENABLE
192 182
183# ifdef KEYBOARD_planck_rev6
184// clang-format off
185led_config_t g_led_config = {
186 {
187 // Key Matrix to LED Index
188 { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED },
189 { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
190 { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 },
191 { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED },
192 { NO_LED, 4, NO_LED, NO_LED, 3, NO_LED },
193 { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
194 { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
195 { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED }
196 }, {
197 // LED Index to Physical Position
198 {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60}
199 }, {
200 // LED Index to Flag
201 LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
202 LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
203 }
204};
205// clange-format on
206# endif
207
193// clang-format off 208// clang-format off
194void suspend_power_down_keymap(void) { 209void suspend_power_down_keymap(void) {
195 rgb_matrix_set_suspend_state(true); 210 rgb_matrix_set_suspend_state(true);
@@ -219,7 +234,7 @@ void rgb_matrix_indicators_user(void) {
219 rgb_matrix_config.enable 234 rgb_matrix_config.enable
220# endif 235# endif
221 ) { 236 ) {
222 switch (biton32(layer_state)) { 237 switch (get_highest_layer(layer_state)) {
223 case _GAMEPAD: 238 case _GAMEPAD:
224 rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 239 rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
225 break; 240 break;
@@ -237,7 +252,7 @@ void rgb_matrix_indicators_user(void) {
237 break; 252 break;
238 default: { 253 default: {
239 bool mods_enabled = IS_LAYER_ON(_MODS); 254 bool mods_enabled = IS_LAYER_ON(_MODS);
240 switch (biton32(default_layer_state)) { 255 switch (get_highest_layer(default_layer_state)) {
241 case _QWERTY: 256 case _QWERTY:
242 rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 257 rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
243 break; 258 break;
@@ -268,7 +283,7 @@ void rgb_matrix_indicators_user(void) {
268 } 283 }
269 } 284 }
270 285
271 switch (biton32(default_layer_state)) { 286 switch (get_highest_layer(default_layer_state)) {
272 case _QWERTY: 287 case _QWERTY:
273 rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); 288 rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF);
274 break; 289 break;
@@ -283,7 +298,9 @@ void rgb_matrix_indicators_user(void) {
283 break; 298 break;
284 } 299 }
285 if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { 300 if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) {
286 if (!layer_state_cmp(layer_state, _ADJUST)) { rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); } 301 if (!layer_state_cmp(layer_state, _ADJUST)) {
302 rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
303 }
287 rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); 304 rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
288 } 305 }
289 if ((this_mod | this_osm) & MOD_MASK_CTRL) { 306 if ((this_mod | this_osm) & MOD_MASK_CTRL) {
@@ -320,7 +337,7 @@ void matrix_init_keymap(void) {
320 337
321#ifdef ENCODER_ENABLE 338#ifdef ENCODER_ENABLE
322void encoder_update(bool clockwise) { 339void encoder_update(bool clockwise) {
323 switch (biton32(layer_state)) { 340 switch (get_highest_layer(layer_state)) {
324 case _RAISE: 341 case _RAISE:
325 clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU); 342 clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
326 break; 343 break;
@@ -363,7 +380,7 @@ void dip_update(uint8_t index, bool active) {
363 } 380 }
364 break; 381 break;
365 case 2: 382 case 2:
366 keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = active; 383 keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = active;
367 break; 384 break;
368 case 3: 385 case 3:
369 userspace_config.nuke_switch = active; 386 userspace_config.nuke_switch = active;
@@ -376,7 +393,7 @@ void dip_update(uint8_t index, bool active) {
376layer_state_t layer_state_set_keymap(layer_state_t state) { 393layer_state_t layer_state_set_keymap(layer_state_t state) {
377 planck_ez_left_led_off(); 394 planck_ez_left_led_off();
378 planck_ez_right_led_off(); 395 planck_ez_right_led_off();
379 switch (biton32(state)) { 396 switch (get_highest_layer(state)) {
380 case _LOWER: 397 case _LOWER:
381 planck_ez_left_led_on(); 398 planck_ez_left_led_on();
382 break; 399 break;
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk
index d4726b7a8..38d0d4517 100644
--- a/layouts/community/ortho_4x12/drashna/rules.mk
+++ b/layouts/community/ortho_4x12/drashna/rules.mk
@@ -1,36 +1,40 @@
1BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) 1BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
2MOUSEKEY_ENABLE = no # Mouse keys(+4700) 2MOUSEKEY_ENABLE = no # Mouse keys(+4700)
3EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 3EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
4CONSOLE_ENABLE = no # Console for debug(+400) 4TAP_DANCE_ENABLE = no
5COMMAND_ENABLE = no # Commands for debug and configuration 5AUDIO_ENABLE = yes
6TAP_DANCE_ENABLE = no
7AUDIO_ENABLE = yes
8SPACE_CADET_ENABLE = no 6SPACE_CADET_ENABLE = no
7NKRO_ENABLE = yes
9 8
10ifneq ($(strip $(KEYBOARD)), planck/rev6) 9ifneq ($(strip $(KEYBOARD)), planck/rev6)
11 RGBLIGHT_ENABLE = yes 10 CONSOLE_ENABLE = no
12 INDICATOR_LIGHTS = yes 11 COMMAND_ENABLE = no
13 RGBLIGHT_TWINKLE = yes 12 ifeq ($(strip $(LAYOUT_HAS_RGB)), yes)
14 RGBLIGHT_STARTUP_ANIMATION = yes 13 RGBLIGHT_ENABLE = yes
14 endif
15 INDICATOR_LIGHTS = yes
16 RGBLIGHT_TWINKLE = yes
17 RGBLIGHT_STARTUP_ANIMATION = yes
18else
19 CONSOLE_ENABLE = yes
20 COMMAND_ENABLE = yes
21 RGBLIGHT_ENABLE = no
22 RGB_MATRIX_ENABLE = WS2812
15endif 23endif
16ifeq ($(strip $(KEYBOARD)), planck/light) 24ifeq ($(strip $(KEYBOARD)), planck/light)
17 RGB_MATRIX_ENABLE = yes 25 RGB_MATRIX_ENABLE = yes
18 RGBLIGHT_ENABLE = no 26 RGBLIGHT_ENABLE = no
19 RGBLIGHT_STARTUP_ANIMATION = no 27 RGBLIGHT_STARTUP_ANIMATION = no
20 HAPTIC_ENABLE += SOLENOID 28 # HAPTIC_ENABLE += SOLENOID
21endif 29endif
22ifeq ($(strip $(KEYBOARD)), planck/ez) 30ifeq ($(strip $(KEYBOARD)), planck/ez)
23 RGBLIGHT_ENABLE = no 31 RGBLIGHT_ENABLE = no
24 # SERIAL_LINK_ENABLE = yes 32 # SERIAL_LINK_ENABLE = yes
25 ENCODER_ENABLE = yes 33 ENCODER_ENABLE = yes
26 RGB_MATRIX_ENABLE = IS31FL3737 34 RGB_MATRIX_ENABLE = IS31FL3737
27 INDICATOR_LIGHTS = yes 35 INDICATOR_LIGHTS = yes
28 RGBLIGHT_TWINKLE = yes 36 RGBLIGHT_TWINKLE = yes
29 RGBLIGHT_STARTUP_ANIMATION = yes 37 RGBLIGHT_STARTUP_ANIMATION = yes
30endif 38 CONSOLE_ENABLE = yes
31 39 COMMAND_ENABLE = yes
32ifeq ($(strip $(PROTOCOL)), VUSB)
33 NKRO_ENABLE = no
34else
35 NKRO_ENABLE = yes
36endif 40endif
diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c
index 86a78336c..0ee9dfb10 100644
--- a/layouts/community/ortho_5x12/drashna/keymap.c
+++ b/layouts/community/ortho_5x12/drashna/keymap.c
@@ -1,24 +1,12 @@
1/* Copyright 2015-2017 Jack Humbert
2 * Modified by KeyPCB for the Fractal keyboard
3 * Backlight isn't on the Fractal, so I've removed the keycode from the keymaps
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include QMK_KEYBOARD_H
20#include "drashna.h" 1#include "drashna.h"
21 2
3/*
4 * The `LAYOUT_ortho_5x12_base` macro is a template to allow the use of identical
5 * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
6 * that there is no need to set them up for each layout, and modify all of
7 * them if I want to change them. This helps to keep consistency and ease
8 * of use. K## is a placeholder to pass through the individual keycodes
9 */
22// clang-format off 10// clang-format off
23#define LAYOUT_ortho_5x12_base( \ 11#define LAYOUT_ortho_5x12_base( \
24 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 12 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
@@ -27,9 +15,9 @@
27 K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ 15 K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \
28 ) \ 16 ) \
29 LAYOUT_ortho_5x12_wrapper( \ 17 LAYOUT_ortho_5x12_wrapper( \
30 KC_GRV, 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, \
31 KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ 19 LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \
32 KC_ESC, ALT_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \ 20 KC_C1R3, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \
33 KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, RCTL_T(K3A), KC_ENT, \ 21 KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, RCTL_T(K3A), KC_ENT, \
34 KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ 22 KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
35 ) 23 )
diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk
index 75affedd1..cae4b27ba 100644
--- a/layouts/community/ortho_5x12/drashna/rules.mk
+++ b/layouts/community/ortho_5x12/drashna/rules.mk
@@ -5,16 +5,12 @@ CONSOLE_ENABLE = no # Console for debug(+400)
5COMMAND_ENABLE = no # Commands for debug and configuration 5COMMAND_ENABLE = no # Commands for debug and configuration
6TAP_DANCE_ENABLE = no 6TAP_DANCE_ENABLE = no
7AUDIO_ENABLE = yes 7AUDIO_ENABLE = yes
8ifeq ($(strip $(KEYBOARD)), fractal)
9 RGB_MATRIX_ENABLE = no
10 AUDIO_ENABLE = yes
11 RGBLIGHT_ENABLE = yes
12 RGBLIGHT_TWINKLE = yes
13 BOOTLOADER = qmk-dfu
14endif
15
16ifeq ($(strip $(PROTOCOL)), VUSB)
17NKRO_ENABLE = no
18else
19NKRO_ENABLE = yes 8NKRO_ENABLE = yes
9
10ifeq ($(strip $(KEYBOARD)), fractal)
11 RGB_MATRIX_ENABLE = no
12 AUDIO_ENABLE = yes
13 RGBLIGHT_ENABLE = yes
14 RGBLIGHT_TWINKLE = yes
15 BOOTLOADER = qmk-dfu
20endif 16endif