From ab5b8c02accdec611cd40a8f1748de43b644bdff Mon Sep 17 00:00:00 2001 From: plodah Date: Fri, 13 Dec 2024 02:09:29 +0000 Subject: [PATCH] Add scrolling on scrlk to nano --- .../trackball_nano/keymaps/plodah/config.h | 35 +++++++++++++++++++ .../trackball_nano/keymaps/plodah/keymap.c | 4 +++ users/plodah/configs/ploopy-common.h | 5 --- 3 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 keyboards/ploopyco/trackball_nano/keymaps/plodah/config.h diff --git a/keyboards/ploopyco/trackball_nano/keymaps/plodah/config.h b/keyboards/ploopyco/trackball_nano/keymaps/plodah/config.h new file mode 100644 index 00000000000..5e57c898cf8 --- /dev/null +++ b/keyboards/ploopyco/trackball_nano/keymaps/plodah/config.h @@ -0,0 +1,35 @@ +#pragma once +#include "plodah.h" +// #include "configs/ploopy-common.h" + +#ifdef PRODUCT + #undef PRODUCT +#endif // PRODUCT +#define PRODUCT "Ploopy Trackball Nano | plodah" + +#define PLOOPY_DRAGSCROLL_ON_SCROLLLOCK_ENABLED + +#ifdef PLOOPY_DPI_OPTIONS + #undef PLOOPY_DPI_OPTIONS +#endif +#define PLOOPY_DPI_OPTIONS { 300, 433, 567, 700 } + +#ifdef PLOOPY_DPI_DEFAULT + #undef PLOOPY_DPI_DEFAULT +#endif +#define PLOOPY_DPI_DEFAULT 2 + +#ifdef PLOOPY_DRAGSCROLL_INVERT + #undef PLOOPY_DRAGSCROLL_INVERT +#endif +#define PLOOPY_DRAGSCROLL_INVERT 1 + +#ifdef PLOOPY_DRAGSCROLL_DIVISOR_V + #undef PLOOPY_DRAGSCROLL_DIVISOR_V +#endif +#define PLOOPY_DRAGSCROLL_DIVISOR_V 6 + +#ifdef PLOOPY_DRAGSCROLL_DIVISOR_H + #undef PLOOPY_DRAGSCROLL_DIVISOR_H +#endif +#define PLOOPY_DRAGSCROLL_DIVISOR_H 6 diff --git a/keyboards/ploopyco/trackball_nano/keymaps/plodah/keymap.c b/keyboards/ploopyco/trackball_nano/keymaps/plodah/keymap.c index f13fbc5d945..27d0b8e72ed 100644 --- a/keyboards/ploopyco/trackball_nano/keymaps/plodah/keymap.c +++ b/keyboards/ploopyco/trackball_nano/keymaps/plodah/keymap.c @@ -21,6 +21,10 @@ // Dummy const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {{{ KC_NO }}}; +report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { + return mouse_report; +} + void suspend_power_down_user(void) { // Switch off sensor + LED making trackball unable to wake host adns5050_power_down(); diff --git a/users/plodah/configs/ploopy-common.h b/users/plodah/configs/ploopy-common.h index c28240ea2cf..5184d81b42a 100644 --- a/users/plodah/configs/ploopy-common.h +++ b/users/plodah/configs/ploopy-common.h @@ -40,11 +40,6 @@ #endif #define PLOOPY_DRAGSCROLL_INVERT 1 -#ifdef PLOOPY_DRAGSCROLL_DPI - #undef PLOOPY_DRAGSCROLL_DPI -#endif -#define PLOOPY_DRAGSCROLL_DPI 100 - #ifdef PLOOPY_DRAGSCROLL_MOMENTARY #undef PLOOPY_DRAGSCROLL_MOMENTARY #endif