diff options
Diffstat (limited to 'users/drashna/pointing/pointing.c')
| -rw-r--r-- | users/drashna/pointing/pointing.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/users/drashna/pointing/pointing.c b/users/drashna/pointing/pointing.c index 0116ce090..0dcfe73f3 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) { | |||
| 42 | layer_on(_MOUSE); | 42 | layer_on(_MOUSE); |
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | } | 45 | } else if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { |
| 46 | return pointing_device_task_keymap(mouse_report); | ||
| 47 | } | ||
| 48 | |||
| 49 | void matrix_scan_pointing(void) { | ||
| 50 | if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { | ||
| 51 | layer_off(_MOUSE); | 46 | layer_off(_MOUSE); |
| 52 | } | 47 | } else if (tap_toggling) { |
| 53 | if (tap_toggling) { | ||
| 54 | if (!layer_state_is(_MOUSE)) { | 48 | if (!layer_state_is(_MOUSE)) { |
| 55 | layer_on(_MOUSE); | 49 | layer_on(_MOUSE); |
| 56 | } | 50 | } |
| 57 | } | 51 | } |
| 52 | |||
| 53 | return pointing_device_task_keymap(mouse_report); | ||
| 58 | } | 54 | } |
| 59 | 55 | ||
| 60 | bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { | 56 | bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { |
| @@ -86,7 +82,7 @@ bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { | |||
| 86 | case MO(_MOUSE): | 82 | case MO(_MOUSE): |
| 87 | #if defined(KEYBOARD_ploopy) || defined(KEYBOARD_handwired_tractyl_manuform) | 83 | #if defined(KEYBOARD_ploopy) || defined(KEYBOARD_handwired_tractyl_manuform) |
| 88 | case DPI_CONFIG: | 84 | case DPI_CONFIG: |
| 89 | #elif defined(KEYBOARD_bastardkb_charybdis) | 85 | #elif defined(KEYBOARD_bastardkb_charybdis) && !defined(NO_CHARYBDIS_KEYCODES) |
| 90 | case SAFE_RANGE ... (CHARYBDIS_SAFE_RANGE-1): | 86 | case SAFE_RANGE ... (CHARYBDIS_SAFE_RANGE-1): |
| 91 | #endif | 87 | #endif |
| 92 | case KC_MS_UP ... KC_MS_WH_RIGHT: | 88 | case KC_MS_UP ... KC_MS_WH_RIGHT: |
| @@ -98,6 +94,12 @@ bool process_record_pointing(uint16_t keycode, keyrecord_t* record) { | |||
| 98 | record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; | 94 | record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; |
| 99 | mouse_timer = timer_read(); | 95 | mouse_timer = timer_read(); |
| 100 | break; | 96 | break; |
| 97 | case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: | ||
| 98 | break; | ||
| 99 | case QK_MOD_TAP ... QK_MOD_TAP_MAX: | ||
| 100 | if (record->event.pressed || !record->tap.count) { | ||
| 101 | break; | ||
| 102 | } | ||
| 101 | default: | 103 | default: |
| 102 | if (IS_NOEVENT(record->event)) break; | 104 | if (IS_NOEVENT(record->event)) break; |
| 103 | if ((keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) && (((keycode >> 0x8) & 0xF) == _MOUSE)) { | 105 | if ((keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) && (((keycode >> 0x8) & 0xF) == _MOUSE)) { |
