Skip to content

Commit f00f4ca

Browse files
kqb: Fix mousekey and gesture
1 parent 6c016d9 commit f00f4ca

File tree

1 file changed

+9
-16
lines changed
  • keyboards/keyboard_quantizer/kqb/keymaps/default

1 file changed

+9
-16
lines changed

keyboards/keyboard_quantizer/kqb/keymaps/default/keymap.c

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
6666
}
6767

6868
switch (keycode) {
69-
case KC_BTN1 ... KC_BTN5: {
70-
report_mouse_t mouse = pointing_device_get_report();
71-
if (record->event.pressed) {
72-
mouse.buttons |= (1 << (keycode - KC_BTN1));
73-
} else {
74-
mouse.buttons &= ~(1 << (keycode - KC_BTN1));
75-
}
76-
pointing_device_set_report(mouse);
77-
78-
return false;
79-
} break;
69+
case KC_BTN1 ... KC_BTN5:
70+
mouse_send_flag = true;
71+
return true;
72+
break;
8073

8174
default:
8275
break;
@@ -177,11 +170,11 @@ void matrix_scan_user(void) {
177170
}
178171

179172
void post_process_record_user(uint16_t keycode, keyrecord_t* record) {
180-
// if (keycode >= QK_MOMENTARY && keycode <= QK_MOMENTARY_MAX) {
181-
// if (record->event.pressed && gesture_wait == false) {
182-
// gesture_start();
183-
// }
184-
// }
173+
if (keycode >= QK_MOMENTARY && keycode <= QK_MOMENTARY_MAX) {
174+
if (record->event.pressed && gesture_wait == false) {
175+
gesture_start();
176+
}
177+
}
185178

186179
if ((keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MOMENTARY && keycode <= QK_MOMENTARY_MAX)) {
187180
if (gesture_wait == true && (!record->event.pressed)) {

0 commit comments

Comments
 (0)