Skip to content

Commit

Permalink
Add scrolling on scrlk to nano
Browse files Browse the repository at this point in the history
  • Loading branch information
plodah committed Dec 13, 2024
1 parent 4618678 commit ab5b8c0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
35 changes: 35 additions & 0 deletions keyboards/ploopyco/trackball_nano/keymaps/plodah/config.h
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions keyboards/ploopyco/trackball_nano/keymaps/plodah/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 0 additions & 5 deletions users/plodah/configs/ploopy-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab5b8c0

Please sign in to comment.