Skip to content

Commit

Permalink
Merge pull request #527 from koron/scrl_mo-keeps-aml-524
Browse files Browse the repository at this point in the history
Keep AML with `SCRL_MO`
  • Loading branch information
koron authored Mar 25, 2024
2 parents 7d53975 + d85cd2a commit d013e71
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion qmk_firmware/keyboards/keyball/lib/keyball/keyball.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit d013e71

Please sign in to comment.