summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2023-05-31 11:44:06 -0700
committerGitHub <noreply@github.com>2023-05-31 11:44:06 -0700
commit3a3e5abac992712a8bb4e9b61430f5fc62dc6043 (patch)
tree832d14c0ca63e13ca1b97e2cbfe94d75d6bb89c7 /layouts
parent1411c79aefc989f5fae138b795f53f3b10863ec9 (diff)
[Keymap] Drashna Keymap updates for 0.21.0 (#21073)
Diffstat (limited to 'layouts')
-rw-r--r--layouts/community/ergodox/drashna/keymap.c68
-rw-r--r--layouts/community/ergodox/drashna/rules.mk7
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c28
3 files changed, 11 insertions, 92 deletions
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 846bbc2351..1853b70071 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -18,8 +18,6 @@
enum more_custom_keycodes {
KC_SWAP_NUM = USER_SAFE_RANGE,
- PM_SCROLL,
- PM_PRECISION,
};
// define layer change stuff for underglow indicator
@@ -44,9 +42,9 @@ bool skip_leds = false;
LAYOUT_ergodox_pretty_wrapper( \
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG_DBLO, TG_DBLO, K06, K07, K08, K09, K0A, KC_BSLS, \
- KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
- KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG_GAME, TG_GAME, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
- KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_BTN1, KC_BTN3, KC_BTN2, PM_SCROLL, PM_PRECISION, \
+ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
+ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG_GAME, TG_GAME, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
+ KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_NO, \
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
KC_APP, KC_MENU, \
KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \
@@ -180,36 +178,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
-#ifdef PIMORONI_TRACKBALL_ENABLE
-void run_trackball_cleanup(void) {
- // if (trackball_is_scrolling()) {
- // trackball_set_rgbw(RGB_CYAN, 0x00);
- // } else if (trackball_get_precision() != 1.0) {
- // trackball_set_rgbw(RGB_GREEN, 0x00);
- // } else {
- // trackball_set_rgbw(RGB_MAGENTA, 0x00);
- // }
-}
-
-void keyboard_post_init_keymap(void) {
- // trackball_set_precision(1.5);
- // trackball_set_rgbw(RGB_MAGENTA, 0x00);
-}
-// void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); }
-
-static bool mouse_button_one, trackball_button_one;
-
-void trackball_register_button(bool pressed, enum mouse_buttons button) {
- report_mouse_t currentReport = pointing_device_get_report();
- if (pressed) {
- currentReport.buttons |= button;
- } else {
- currentReport.buttons &= ~button;
- }
- pointing_device_set_report(currentReport);
-}
-#endif
-
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_1:
@@ -235,40 +203,15 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
case KC_SWAP_NUM:
if (record->event.pressed) {
userspace_config.swapped_numbers ^= 1;
- eeconfig_update_user(userspace_config.raw);
+ eeconfig_update_user_config(&userspace_config.raw);
}
break;
-#ifdef PIMORONI_TRACKBALL_ENABLE
- case PM_SCROLL:
- // trackball_set_scrolling(record->event.pressed);
- run_trackball_cleanup();
- break;
- case PM_PRECISION:
- // if (record->event.pressed) {
- // trackball_set_precision(1.5);
- // } else {
- // trackball_set_precision(1);
- // }
- // run_trackball_cleanup();
- break;
-# if !defined(MOUSEKEY_ENABLE)
- case KC_MS_BTN1:
- mouse_button_one = record->event.pressed;
- trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1);
- break;
- case KC_MS_BTN2:
- trackball_register_button(record->event.pressed, MOUSE_BTN2);
- break;
- case KC_MS_BTN3:
- trackball_register_button(record->event.pressed, MOUSE_BTN3);
- break;
-# endif
-#endif
}
return true;
}
void housekeeping_task_keymap(void) { // runs frequently to update info
+#ifdef KEYBOARD_ergodox_ez
uint8_t modifiers = get_mods();
uint8_t led_usb_state = host_keyboard_leds();
uint8_t one_shot = get_oneshot_mods();
@@ -295,6 +238,7 @@ void housekeeping_task_keymap(void) { // runs frequently to update info
ergodox_right_led_3_set(10);
}
}
+#endif
}
bool indicator_is_this_led_used_keyboard(uint8_t index) {
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk
index f5e9b500e0..072b70de19 100644
--- a/layouts/community/ergodox/drashna/rules.mk
+++ b/layouts/community/ergodox/drashna/rules.mk
@@ -8,10 +8,13 @@ ifeq ($(strip $(KEYBOARD)), ergodox_ez)
RGB_MATRIX_ENABLE = yes
INDICATOR_LIGHTS = no
RGBLIGHT_STARTUP_ANIMATION = yes
- PIMORONI_TRACKBALL_ENABLE = no
- MOUSEKEY_ENABLE = no
endif
UNICODE_ENABLE = no
UNICDOEMAP_ENABLE = no
CUSTOM_UNICODE_ENABLE = no
+
+ifeq ($(strip $(KEYBOARD)), hotdox76v2)
+ OLED_ENABLE = no
+ RGB_MATRIX_ENABLE = no
+endif
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index cc84c132d9..475ccc5c3a 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -237,34 +237,6 @@ void keyboard_post_init_keymap(void) {
}
#endif // RGB_MATRIX_INIT
-#ifdef ENCODER_ENABLE
-bool encoder_update_user(uint8_t index, bool clockwise) {
- switch (get_highest_layer(layer_state)) {
- case _RAISE:
- clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
- break;
- case _LOWER:
-# ifdef RGB_MATRIX_ENABLE
- clockwise ? rgb_matrix_step() : rgb_matrix_step_reverse();
-# else
- clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
-# endif
- break;
- case _ADJUST:
-# ifdef AUDIO_CLICKY
- clockwise ? clicky_freq_up() : clicky_freq_down();
-# endif
- break;
- default:
- clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP);
- }
-# ifdef AUDIO_CLICKY
- clicky_play();
-# endif
- return true;
-}
-#endif // ENCODER_ENABLE
-
#ifdef KEYBOARD_planck_rev6
bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {