From 941b1d35b8e40a9c93301a1131ef3f3336fee0b5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 30 Jan 2022 13:20:33 -0800 Subject: [Keymap] Add oled improvements and cnano keymap for drashna (#16133) --- users/drashna/pointing/pointing.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'users/drashna/pointing/pointing.c') diff --git a/users/drashna/pointing/pointing.c b/users/drashna/pointing/pointing.c index 0116ce0900..0dcfe73f34 100644 --- a/users/drashna/pointing/pointing.c +++ b/users/drashna/pointing/pointing.c @@ -42,19 +42,15 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { layer_on(_MOUSE); } } - } - return pointing_device_task_keymap(mouse_report); -} - -void matrix_scan_pointing(void) { - if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { + } else if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { layer_off(_MOUSE); - } - if (tap_toggling) { + } else if (tap_toggling) { if (!layer_state_is(_MOUSE)) { layer_on(_MOUSE); } } + + return pointing_device_task_keymap(mouse_report); } bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { @@ -86,7 +82,7 @@ bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { case MO(_MOUSE): #if defined(KEYBOARD_ploopy) || defined(KEYBOARD_handwired_tractyl_manuform) case DPI_CONFIG: -#elif defined(KEYBOARD_bastardkb_charybdis) +#elif defined(KEYBOARD_bastardkb_charybdis) && !defined(NO_CHARYBDIS_KEYCODES) case SAFE_RANGE ... (CHARYBDIS_SAFE_RANGE-1): #endif case KC_MS_UP ... KC_MS_WH_RIGHT: @@ -98,6 +94,12 @@ bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; mouse_timer = timer_read(); break; + case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: + break; + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + if (record->event.pressed || !record->tap.count) { + break; + } default: if (IS_NOEVENT(record->event)) break; if ((keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) && (((keycode >> 0x8) & 0xF) == _MOUSE)) { -- cgit v1.2.1