From d85cd2a25d9efdf83e2de1a1a8dc164875edcf14 Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Mon, 25 Mar 2024 10:47:40 +0900 Subject: [PATCH] Keep AML with `SCRL_MO` fix https://github.com/Yowkees/keyball/issues/524 --- .../keyboards/keyball/lib/keyball/keyball.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c index 5204efdbf..66ebbee31 100644 --- a/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c +++ b/qmk_firmware/keyboards/keyball/lib/keyball/keyball.c @@ -579,6 +579,16 @@ static void pressing_keys_update(uint16_t keycode, keyrecord_t *record) { } } +#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE +bool is_mouse_record_kb(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case SCRL_MO: + return true; + } + return is_mouse_record_user(keycode, record); +} +#endif + bool process_record_kb(uint16_t keycode, keyrecord_t *record) { // store last keycode, row, and col for OLED keyball.last_kc = keycode; @@ -609,7 +619,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { case SCRL_MO: keyball_set_scroll_mode(record->event.pressed); - return false; + // process_auto_mouse may use this in future, if changed order of + // processes. + return true; } // process events which works on pressed only.