aboutsummaryrefslogtreecommitdiff
path: root/layouts/community/ergodox/drashna/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community/ergodox/drashna/keymap.c')
-rw-r--r--layouts/community/ergodox/drashna/keymap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 3e1460606..600e29020 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -19,7 +19,7 @@
19#ifdef UNICODEMAP_ENABLE 19#ifdef UNICODEMAP_ENABLE
20# include "drashna_unicode.h" 20# include "drashna_unicode.h"
21#endif // UNICODEMAP_ENABLE 21#endif // UNICODEMAP_ENABLE
22 22#include "drivers/sensors/pimoroni_trackball.h"
23enum more_custom_keycodes { 23enum more_custom_keycodes {
24 KC_SWAP_NUM = NEW_SAFE_RANGE, 24 KC_SWAP_NUM = NEW_SAFE_RANGE,
25 PM_SCROLL, 25 PM_SCROLL,
@@ -317,13 +317,14 @@ void shutdown_keymap(void) {
317 317
318static bool mouse_button_one, trackball_button_one; 318static bool mouse_button_one, trackball_button_one;
319 319
320void trackball_check_click(bool pressed, report_mouse_t* mouse) { 320void trackball_register_button(bool pressed, enum mouse_buttons button) {
321 if (mouse_button_one | pressed) { 321 report_mouse_t currentReport = pointing_device_get_report();
322 mouse->buttons |= MOUSE_BTN1; 322 if (pressed) {
323 currentReport.buttons |= button;
323 } else { 324 } else {
324 mouse->buttons &= ~MOUSE_BTN1; 325 currentReport.buttons &= ~button;
325 } 326 }
326 trackball_button_one = pressed; 327 pointing_device_set_report(currentReport);
327} 328}
328#endif 329#endif
329 330