Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keymap] Drashna updates for 0.20.0 #19960

Merged
merged 36 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c5378bf
Enable split watchdog and clean up split defines
drashna Nov 29, 2022
189a33c
Add fancy-ish layer printout
drashna Dec 1, 2022
5b7ade1
add hacky solution to audio config
drashna Dec 4, 2022
ce6489c
re-add mod tap keycodes to charybdis keymap
drashna Dec 5, 2022
6da19c3
Update sh110x driver
drashna Dec 6, 2022
a850cff
rename oled matrix scan to housekeeping
drashna Dec 9, 2022
ff3d6cc
Remove rest of matrix_scan functions
drashna Dec 9, 2022
ebe4f66
Add oled screen lock-on function
drashna Dec 9, 2022
1a4ba2a
Add os fingerprinting support
drashna Sep 24, 2022
9ded612
format pass
drashna Dec 9, 2022
d5d6231
Enable caps word hack for work
drashna Dec 10, 2022
b80bea0
Increase wear leveling size for increased eeprom usage
drashna Dec 10, 2022
4b0f2c8
Fix oled rendering
drashna Dec 14, 2022
51d92e1
fix compiler issue with oled stuff
drashna Dec 22, 2022
dbd7350
Remove encoder debouncing hack
drashna Dec 23, 2022
11316a6
Switch acceleration curve for mouse accel
drashna Dec 24, 2022
a50c8b7
Add corrected encoder map arrays
drashna Dec 29, 2022
a6a1acc
Add math include for fancy accel maths
drashna Jan 2, 2023
b416882
Fix issues with dynamic keymaps and avr
drashna Jan 9, 2023
ca0ca90
Use updated keycode ranges
drashna Jan 11, 2023
62b1ffe
Make OLED Title customized
drashna Jan 12, 2023
b5990f8
Remove handedness check in layer state set callback
drashna Jan 12, 2023
df7c29d
Move pointer config
drashna Jan 14, 2023
476f2a3
Update RGB Matrix config for Charybdis
drashna Jan 24, 2023
7edc0f2
Fix audio config includes
drashna Jan 31, 2023
28e3e19
Split out audo config
drashna Jan 31, 2023
a567d74
Cleanup readmes
drashna Jan 31, 2023
2c18730
Remove extra rgb matrix function call
drashna Feb 4, 2023
a9ab2b9
fix tractyl keymap
drashna Feb 4, 2023
3e1edc1
fix keylogger length
drashna Feb 4, 2023
ed5fd68
Fix formatting
drashna Feb 4, 2023
1fc57e5
Disable shared mouse EP
drashna Feb 13, 2023
4ce5e28
Make os detection printing much much less verbose
drashna Feb 13, 2023
de6d549
Turn off click when playing loop
drashna Feb 13, 2023
e311fa6
Update range stuff
drashna Feb 19, 2023
10526ac
Fix kyria rev3 compilation issue
drashna Feb 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
# undef POINTING_DEVICE_CS_PIN
# define POINTING_DEVICE_CS_PIN A15 // b14
# define PMW33XX_LIFTOFF_DISTANCE 0b1111

# define RGB_MATRIX_LED_FLUSH_LIMIT 33
# define RGB_MATRIX_LED_PROCESS_LIMIT 29
#endif

#undef ROTATIONAL_TRANSFORM_ANGLE
Expand Down
14 changes: 5 additions & 9 deletions keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
#include "drashna.h"

// clang-format off
#define LAYOUT_charybdis_4x6_wrapper(...) LAYOUT_charybdis_4x6(__VA_ARGS__)
#define LAYOUT_charybdis_4x6_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
Expand All @@ -26,14 +27,13 @@
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_CLUE, \
SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
OS_LSFT,CTL_T(K21), K22, K23, K24, K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
OS_LSFT,CTL_T(K21),ALT_T(K22),GUI_T(K23),K24,K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
SFT_T(KC_GRV), OS_LALT, OS_LGUI, TT(_MOUSE), KC_ENT, \
KC_SPC, BK_LWER, DL_RAIS \
)

#define LAYOUT_base_wrapper(...) LAYOUT_charybdis_4x6_base(__VA_ARGS__)

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
Expand Down Expand Up @@ -120,13 +120,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on


void keyboard_post_init_keymap(void) {
#ifdef RGB_MATRIX_ENABLE
g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] =
g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] =
g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] =
LED_FLAG_MODIFIER;
g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] = g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] = g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] = LED_FLAG_MODIFIER;
#endif
}

Expand Down Expand Up @@ -171,8 +167,8 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
{{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}},
};
{{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}}
};

# ifdef ENCODER_MAP_ENABLE
const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0};
Expand Down
3 changes: 1 addition & 2 deletions keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ ifeq ($(strip $(OVERLOAD_FEATURES)), yes)
NKRO_ENABLE = yes # Enable N-Key Rollover
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow

KEYBOARD_SHARED_EP = yes
MOUSE_SHARED_EP = yes
MOUSE_SHARED_EP = no

AUTOCORRECT_ENABLE = yes
CAPS_WORD_ENABLE = yes
Expand Down
26 changes: 18 additions & 8 deletions keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,24 @@ bool oled_task_keymap(void) {

// render_rgb_hsv(1, 13);
oled_set_cursor(1, 13);
// oled_write_P(PSTR("Timer:"), false);
// oled_write(get_u8_str((uint8_t)(timer_elapsed32(oled_timer) / 1000), ' '), false);
oled_write_P(PSTR("Status: "), false);
if (is_oled_enabled) {
oled_write_P(PSTR("on "), false);
} else {
oled_write_P(PSTR("off"), false);
}
oled_write_P(PSTR("OS: "), false);
extern os_variant_t os_type;
switch (os_type) {
case OS_LINUX:
oled_write_ln_P(PSTR("Linux"), false);
break;
case OS_WINDOWS:
oled_write_ln_P(PSTR("Windows"), false);
break;
case OS_MACOS:
oled_write_ln_P(PSTR("MacOS"), false);
break;
case OS_IOS:
oled_write_ln_P(PSTR("iOS"), false);
break;
default:
break;
}

render_keylogger_status(1, 14);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -185,7 +186,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
return false;
}
#endif
# endif
#endif

#ifdef OLED_ENABLE
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion keyboards/keebio/viterbi/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define TT_MDIA TT(_MEDIA)

// enum more_custom_keycodes {
// KC_P00 = NEW_SAFE_RANGE
// KC_P00 = USER_SAFE_RANGE
//};

// clang-format off
Expand Down
4 changes: 3 additions & 1 deletion keyboards/moonlander/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#include "drashna.h"

enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
enum more_custom_keycodes {
KC_SWAP_NUM = USER_SAFE_RANGE,
};

// clang-format off
#define LAYOUT_moonlander_wrapper(...) LAYOUT_moonlander(__VA_ARGS__)
Expand Down
9 changes: 9 additions & 0 deletions keyboards/ploopyco/mouse/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
#include QMK_KEYBOARD_H

// safe range starts at `USER_SAFE_RANGE` instead.

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
Expand All @@ -26,6 +28,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on

#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
[1] = { ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
};
#endif

#ifdef RGBLIGHT_ENABLE
void eeconkfig_init_user(void) {
rgblight_enable();
Expand Down
25 changes: 16 additions & 9 deletions keyboards/splitkb/kyria/keymaps/drashna/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,21 @@
#define QMK_ESC_INPUT D4
#define QMK_ESC_OUTPUT B2

#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 7
#define BOOTMAGIC_LITE_ROW_RIGHT 4
#define BOOTMAGIC_LITE_COLUMN_RIGHT 7

#define BOOTMAGIC_LITE_EEPROM_ROW 1
#define BOOTMAGIC_LITE_EEPROM_COLUMN 7
#define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
#define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
#ifndef KEYBOARD_splitkb_kyria_rev3
# define BOOTMAGIC_LITE_ROW 0
# define BOOTMAGIC_LITE_COLUMN 7
# define BOOTMAGIC_LITE_ROW_RIGHT 4
# define BOOTMAGIC_LITE_COLUMN_RIGHT 7

# define BOOTMAGIC_LITE_EEPROM_ROW 1
# define BOOTMAGIC_LITE_EEPROM_COLUMN 7
# define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
# define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
#endif

#define SERIAL_USART_SPEED 921600

#if defined(KEYBOARD_splitkb_kyria_rev1_proton_c)
# define WEAR_LEVELING_BACKING_SIZE 16384
# define WEAR_LEVELING_LOGICAL_SIZE 8192
#endif
36 changes: 20 additions & 16 deletions keyboards/splitkb/kyria/keymaps/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,39 @@ 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_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_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
[_DEFAULT_LAYER_2] = { 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( _______, _______ ) },
};
#endif
// clang-format on

#ifdef OLED_ENABLE
void render_oled_title(bool side) {
oled_write_P(side ? PSTR(" Splitkb ") : PSTR(" Kyria "), true);
}

oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
#ifdef OLED_DRIVER_SH1107
# ifdef OLED_DRIVER_SH1107
return OLED_ROTATION_0;
#else
# else
return OLED_ROTATION_180;
#endif
# endif
}

void oled_render_large_display(bool side) {
if (side) {
render_wpm_graph(56, 64);
} else {
// clang-format off
static const char PROGMEM kyria_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand All @@ -144,7 +149,7 @@ void oled_render_large_display(bool side) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// clang-format on
oled_set_cursor(0,7);
oled_set_cursor(0, 7);
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
}
}
Expand All @@ -171,7 +176,6 @@ void housekeeping_task_keymap(void) {
}
#endif


#ifdef KEYBOARD_splitkb_kyria_rev1_proton_c
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
for (int32_t i = 0; i < 40; i++) {
Expand Down
2 changes: 1 addition & 1 deletion layouts/community/ergodox/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "drashna.h"

enum more_custom_keycodes {
KC_SWAP_NUM = NEW_SAFE_RANGE,
KC_SWAP_NUM = USER_SAFE_RANGE,
PM_SCROLL,
PM_PRECISION,
};
Expand Down
28 changes: 4 additions & 24 deletions layouts/community/ortho_4x12/drashna/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,11 @@

#include "drashna.h"

#ifdef BACKLIGHT_ENABLE
#define BACKLIT OSM(MOD_LSFT)
enum planck_keycodes {
BACKLIT = NEW_SAFE_RANGE,
TH_LVL,
TH_LVL = USER_SAFE_RANGE,
};

#else
# define BACKLIT OSM(MOD_LSFT)
enum planck_keycodes {
TH_LVL = NEW_SAFE_RANGE,
};
#endif

#ifdef KEYBOARD_planck_ez
# define PLNK_1 BK_LWER
# define PLNK_2 SP_LWER
Expand Down Expand Up @@ -56,10 +48,10 @@ enum planck_keycodes {
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
) \
LAYOUT_ortho_4x12_wrapper( \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, PRINT_SETUPS, \
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
STORE_SETUPS, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
)
#define LAYOUT_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)

Expand Down Expand Up @@ -130,18 +122,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {

bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
#ifdef BACKLIGHT_ENABLE
case BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
# ifdef BACKLIGHT_ENABLE
backlight_step();
# endif
} else {
unregister_code(KC_RSFT);
}
break;
#endif
#ifdef KEYBOARD_planck_ez
case TH_LVL:
if (record->event.pressed) {
Expand Down
Loading