Created
April 1, 2025 23:27
-
-
Save drashna/52f6ca788fdafc05ea6e44fabb7b7da0 to your computer and use it in GitHub Desktop.
nano scroll lock scrolling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include QMK_KEYBOARD_H | |
// Dummy | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {{{KC_NO}}}; | |
void suspend_power_down_user(void) { | |
// Switch off sensor + LED making trackball unable to wake host | |
adns5050_power_down(); | |
} | |
void suspend_wakeup_init_user(void) { | |
adns5050_init(); | |
} | |
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { | |
if (host_keyboard_led_state().scroll_lock) { | |
mouse_report.h = mouse_report.y; | |
mouse_report.v = mouse_report.x; | |
mouse_report.x = 0; | |
mouse_report.y = 0; | |
} | |
return mouse_report; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment