From 8c4a5f9ba213081f70db37680d799a637833c261 Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Sun, 3 Jul 2022 00:03:11 +1200 Subject: Add lkbm keymap (#17218) --- keyboards/ploopyco/trackball_nano/trackball_nano.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'keyboards/ploopyco/trackball_nano/trackball_nano.c') 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 -- cgit v1.2.3