diff options
Diffstat (limited to 'layouts/community/ergodox/drashna')
-rw-r--r-- | layouts/community/ergodox/drashna/config.h | 1 | ||||
-rw-r--r-- | layouts/community/ergodox/drashna/keymap.c | 13 | ||||
-rw-r--r-- | layouts/community/ergodox/drashna/visualizer.c_old (renamed from layouts/community/ergodox/drashna/visualizer.c) | 0 |
3 files changed, 8 insertions, 6 deletions
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 4ccba8f04b..f9daf277fb 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -47,3 +47,4 @@ #define PIMORONI_TRACKBALL_INVERT_X #define PIMORONI_TRACKBALL_INVERT_Y +#define PIMORONI_TRACKBALL_CLICK diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 3e14606060..600e29020d 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -19,7 +19,7 @@ #ifdef UNICODEMAP_ENABLE # include "drashna_unicode.h" #endif // UNICODEMAP_ENABLE - +#include "drivers/sensors/pimoroni_trackball.h" enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE, PM_SCROLL, @@ -317,13 +317,14 @@ void shutdown_keymap(void) { static bool mouse_button_one, trackball_button_one; -void trackball_check_click(bool pressed, report_mouse_t* mouse) { - if (mouse_button_one | pressed) { - mouse->buttons |= MOUSE_BTN1; +void trackball_register_button(bool pressed, enum mouse_buttons button) { + report_mouse_t currentReport = pointing_device_get_report(); + if (pressed) { + currentReport.buttons |= button; } else { - mouse->buttons &= ~MOUSE_BTN1; + currentReport.buttons &= ~button; } - trackball_button_one = pressed; + pointing_device_set_report(currentReport); } #endif diff --git a/layouts/community/ergodox/drashna/visualizer.c b/layouts/community/ergodox/drashna/visualizer.c_old index 6b1c3ff498..6b1c3ff498 100644 --- a/layouts/community/ergodox/drashna/visualizer.c +++ b/layouts/community/ergodox/drashna/visualizer.c_old |