summaryrefslogtreecommitdiffstats
path: root/keyboards/ploopyco/trackball_nano/trackball_nano.c
diff options
context:
space:
mode:
authorAidan Gauland <aidalgol@users.noreply.github.com>2022-07-03 00:03:11 +1200
committerGitHub <noreply@github.com>2022-07-02 22:03:11 +1000
commit8c4a5f9ba213081f70db37680d799a637833c261 (patch)
tree4d79878e4fd0146aa74c6ebeffff4907e88e11e9 /keyboards/ploopyco/trackball_nano/trackball_nano.c
parentee26d3e77f0d3c841086d8d33a2cb5d97e1dd055 (diff)
Add lkbm keymap (#17218)
Diffstat (limited to 'keyboards/ploopyco/trackball_nano/trackball_nano.c')
-rw-r--r--keyboards/ploopyco/trackball_nano/trackball_nano.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.c b/keyboards/ploopyco/trackball_nano/trackball_nano.c
index e208a728cb..0f2fbe2f72 100644
--- a/keyboards/ploopyco/trackball_nano/trackball_nano.c
+++ b/keyboards/ploopyco/trackball_nano/trackball_nano.c
@@ -52,6 +52,14 @@ keyboard_config_t keyboard_config;
uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS;
#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t))
+void cycle_dpi(void) {
+ keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE;
+ pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]);
+#ifdef CONSOLE_ENABLE
+ uprintf("DPI is now %d\n", dpi_array[keyboard_config.dpi_config]);
+#endif
+}
+
// TODO: Implement libinput profiles
// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html
// Compile time accel selection