Skip to content

feat(pointing): add pointing modes (Cursor/Scroll/Sniper)#874

Open
Schievel1 wants to merge 18 commits into
HaoboGu:mainfrom
Schievel1:add-pointing-modes
Open

feat(pointing): add pointing modes (Cursor/Scroll/Sniper)#874
Schievel1 wants to merge 18 commits into
HaoboGu:mainfrom
Schievel1:add-pointing-modes

Conversation

@Schievel1

@Schievel1 Schievel1 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Thanks to Raymond8196 for most of the work on this. See also #728
Add pointing device modes to RMK, allowing trackballs to behave differently on different modes (e.g., scroll on layer 1, precision mode on layer 2).

Key Features

Per-Layer Pointing Modes:

  • Cursor: Normal trackball mode (default)
  • Scroll: Convert motion to scroll wheel events
  • Sniper: Reduced sensitivity for precision control
  • Caret: Emit keytaps with trackball movement (mostly arrow keys, but can be configured)

Usage:

use rmk::{
  event::{LayerChangeEvent, PointingProcessorEvent, publish_event},
  input_device::pointing::PointingMode, types::keycode::HidKeyCode,
};
use rmk_macro::processor;

#[processor(subscribe = [LayerChangeEvent])]
#[derive(Default)]
pub struct PointingProcessorController;

impl PointingProcessorController {
  pub fn new() -> Self {
      Self
  }

  async fn on_layer_change_event(&mut self, event: LayerChangeEvent) {
      match event.0 {
          0 => {
              publish_event(PointingProcessorEvent {
                  device_id: 255,
                  mode: PointingMode::Cursor,
              });
          }
          1 => {
              publish_event(PointingProcessorEvent {
                  device_id: 255,
                  mode: PointingMode::Sniper(rmk::input_device::pointing::SniperConfig {
                      divisor: 8,
                      invert_x: false,
                      invert_y: false,
                  }),
              });
          }
          2 => {
              publish_event(PointingProcessorEvent {
                  device_id: 255,
                  mode: PointingMode::Scroll(rmk::input_device::pointing::ScrollConfig {
                      divisor_x: 16,
                      divisor_y: 16,
                      invert_x: false,
                      invert_y: false,
                  }),
              });
          }
          3 => {
              publish_event(PointingProcessorEvent {
                  device_id: 255,
                  mode: PointingMode::Caret(rmk::input_device::pointing::CaretConfig {
                      disable_x: false,
                      disable_y: false,
                      invert_x: false,
                      invert_y: false,
                      threshold: 100,
                      keycode_up: HidKeyCode::Up,
                      keycode_down: HidKeyCode::Down,
                      keycode_left: HidKeyCode::Left,
                      keycode_right: HidKeyCode::Right,
                  }),
              });
          }

          _ => {}
      }
  }
}

Technical Details:

  • Sub-pixel motion accumulation prevents precision loss
  • Configurable sensitivity divisors for each mode
  • Memory overhead: ~17 bytes (4-layer keyboard)
  • Backward compatible: default behavior unchanged

Test Plan

  • unit tests for mode switching, accumulation, and edge cases
  • All existing tests pass, zero clippy warnings
  • Tested with PMW33xx/PMW3610 examples
  • Verified Vial compatibility

Related Issues

Addresses #703

TODO:

Add support for pointing device modes to PointingProcessor.
Users can now configure different layers to have different trackball
behaviors, enabling scroll and precision modes via event based switching.

Changes:
- Add PointingMode enum (Cursor/Scroll/Sniper) with configs
- Add MotionAccumulator for sub-pixel delta tracking
- Subscribe to PointingDeviceEvent to receive layer changes

Backward compatible: default behavior unchanged

Addresses HaoboGu#703

Co-authored-by: Pascal Jäger <pascal.jaeger@leimstift.de>
Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
@Schievel1 Schievel1 force-pushed the add-pointing-modes branch from 01f3709 to e37ae72 Compare June 4, 2026 06:09
Co-authored-by: Pascal Jäger <pascal.jaeger@leimstift.de>
Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
@Schievel1 Schievel1 force-pushed the add-pointing-modes branch from e37ae72 to a49146c Compare June 4, 2026 06:17
Raymond8196 and others added 2 commits June 4, 2026 08:23
Co-authored-by: Pascal Jäger <pascal.jaeger@leimstift.de>
Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
@Schievel1

Schievel1 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

alrighty. Test fail, I will take care of this later.

In qmk I used to have integration scrolling mode. When in this mode, the trackball not just acts like a scroll wheel, but instead when you move it in one direction, and leave it there, it keeps scrolling. (even though the trackball is not rolled anymore)
I never got the hang of it, but some people found it extremely useful for having autoscroll in programs that do not automatically support it. They set up a PDF, activate this slow scroll in their reading pace and start reading.
Shall we implement that as well?

Also there's caret mode, which basically emits arrow keys when moving the trackball. Useful to move the cursor in text documents.

More info on those:
https://codeberg.org/Schievel/dactyl_manuform_r_track#headline-26

Comment thread docs/docs/main/docs/configuration/input_device/pmw33xx.mdx Outdated
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Size Report

Example main PR Diff .text .data .bss
use_config/nrf52832_ble 372.1 KiB 372.2 KiB +0.01% ⬆️ +40 0 +32
use_config/nrf52840_ble 421.7 KiB 422.1 KiB +0.08% ⬆️ +320 0 +40
use_config/nrf52840_ble_split (central) 497.2 KiB 497.5 KiB +0.06% ⬆️ +288 0 +40
use_config/nrf52840_ble_split (peripheral) 322.2 KiB 322.9 KiB +0.20% ⬆️ +604 0 +80
use_config/pi_pico_w_ble 659.3 KiB 659.3 KiB +0.00% ⬆️ +4 0 +32
use_config/rp2040 147.2 KiB 147.2 KiB +0.00% 0 0 0
use_config/rp2040_split (central) 160.4 KiB 160.8 KiB +0.20% ⬆️ +292 0 +44
use_config/rp2040_split (peripheral) 27.4 KiB 27.8 KiB +1.42% ⬆️ +368 0 +32
use_config/stm32f1 62.6 KiB 62.6 KiB +0.00% 0 0 0
use_config/stm32h7 99.8 KiB 99.8 KiB +0.00% ⬇️ -4 0 0
use_rust/nrf52832_ble 359.6 KiB 359.6 KiB +0.01% ⬆️ +40 0 +32
use_rust/nrf52840_ble 417.8 KiB 418.1 KiB +0.06% ⬆️ +256 0 +40
use_rust/nrf52840_ble_split (central) 506.6 KiB 506.5 KiB -0.02% ⬇️ -164 0 +40
use_rust/nrf52840_ble_split (peripheral) 319.0 KiB 319.6 KiB +0.20% ⬆️ +584 0 +88
use_rust/pi_pico_w_ble 659.9 KiB 659.9 KiB +0.00% ⬆️ -8 0 +32
use_rust/rp2040 147.2 KiB 147.2 KiB +0.00% ⬆️ +4 0 0
use_rust/rp2040_split (central) 159.6 KiB 160.0 KiB +0.21% ⬆️ +312 0 +40
use_rust/rp2040_split (peripheral) 27.8 KiB 28.1 KiB +1.23% ⬆️ +320 0 +32
use_rust/stm32f1 62.6 KiB 62.6 KiB +0.00% ⬇️ -4 0 0
use_rust/stm32h7 121.2 KiB 121.2 KiB +0.00% ⬆️ +4 0 0
use_config/nrf52832_ble — 372.1 KiB → 372.2 KiB (+0.01% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 341460	   5256	  34408	 381124	  5d0c4	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 341420	   5256	  34376	 381052	  5d07c	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +4.43Ki  [ = ]       0    .debug_str
  +0.0%    +348  [ = ]       0    .debug_info
  +0.1%    +152  [ = ]       0    .debug_ranges
  +0.3%    +120  [ = ]       0    .debug_aranges
  +0.0%     +41  [ = ]       0    .strtab
  +0.0%     +40  +0.0%     +40    .text
  [ = ]       0  +0.1%     +32    .bss
  +0.0%     +32  [ = ]       0    .symtab
  +0.3%     +26  [ = ]       0    .debug_abbrev
  +0.1%     +24  [ = ]       0    .debug_frame
 -15.9%     -10  [ = ]       0    [Unmapped]
  -0.0%    -146  [ = ]       0    .debug_line
  -0.1%    -733  [ = ]       0    .debug_loc
  +0.1% +4.32Ki  +0.0%     +72    TOTAL
use_config/nrf52840_ble — 421.7 KiB → 422.1 KiB (+0.08% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 375720	   5264	  51216	 432200	  69848	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 375400	   5264	  51176	 431840	  696e0	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +5.58Ki  [ = ]       0    .debug_str
  +0.1%    +304  +0.1%    +304    .text
  +0.3%    +136  [ = ]       0    .debug_aranges
  +0.1%     +96  [ = ]       0    .symtab
  +0.0%     +77  [ = ]       0    .strtab
  +0.1%     +56  [ = ]       0    .debug_frame
  [ = ]       0  +0.1%     +40    .bss
  +0.0%     +16  +0.0%     +16    .rodata
  +5.5%      +3  [ = ]       0    [Unmapped]
  -0.2%     -14  [ = ]       0    .debug_abbrev
  -0.1%    -120  [ = ]       0    .debug_ranges
  -0.1%    -227  [ = ]       0    .debug_line
  -0.0%    -744  [ = ]       0    .debug_info
  -0.1% -1.08Ki  [ = ]       0    .debug_loc
  +0.1% +4.09Ki  +0.1%    +360    TOTAL
use_config/nrf52840_ble_split (central) — 497.2 KiB → 497.5 KiB (+0.06% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 455864	   6588	  47032	 509484	  7c62c	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 455576	   6588	  46992	 509156	  7c4e4	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +6.75Ki  [ = ]       0    .debug_info
  +0.1% +5.54Ki  [ = ]       0    .debug_str
  +0.3% +2.67Ki  [ = ]       0    .debug_loc
  +0.3%    +712  [ = ]       0    .debug_ranges
  +0.2%    +687  [ = ]       0    .debug_line
  +0.1%    +272  +0.1%    +272    .text
  +0.1%    +160  [ = ]       0    .symtab
  +0.0%    +149  [ = ]       0    .strtab
  +0.3%    +144  [ = ]       0    .debug_aranges
  +0.1%     +68  [ = ]       0    .debug_frame
  [ = ]       0  +0.1%     +40    .bss
  +0.4%     +38  [ = ]       0    .debug_abbrev
  +0.0%     +16  +0.0%     +16    .rodata
  +5.2%      +3  [ = ]       0    [Unmapped]
  +0.2% +17.2Ki  +0.1%    +328    TOTAL
use_config/nrf52840_ble_split (peripheral) — 322.2 KiB → 322.9 KiB (+0.20% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 297152	   5920	  27592	 330664	  50ba8	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 296548	   5920	  27512	 329980	  508fc	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +8.18Ki  [ = ]       0    .debug_str
  +0.3% +4.39Ki  [ = ]       0    .debug_info
  +0.3% +1.62Ki  [ = ]       0    .debug_loc
  +0.2%    +588  +0.2%    +588    .text
  +0.2%    +466  [ = ]       0    .strtab
  +0.3%    +304  [ = ]       0    .symtab
  +0.4%    +176  [ = ]       0    .debug_aranges
  +0.1%    +145  [ = ]       0    .debug_line
  +0.4%    +132  [ = ]       0    .debug_frame
  [ = ]       0  +0.3%     +80    .bss
  +0.0%     +16  +0.0%     +16    .rodata
   +24%     +10  [ = ]       0    [Unmapped]
  -0.1%    -112  [ = ]       0    .debug_ranges
  +0.3% +15.9Ki  +0.2%    +684    TOTAL
use_config/pi_pico_w_ble — 659.3 KiB → 659.3 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 619528	      0	  55604	 675132	  a4d3c	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 619524	      0	  55572	 675096	  a4d18	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +4.42Ki  [ = ]       0    .debug_str
  +0.1% +1.38Ki  [ = ]       0    .debug_info
  +0.3%    +112  [ = ]       0    .debug_aranges
  [ = ]       0  +0.1%     +32    .bss
  +0.0%     +15  [ = ]       0    .debug_loc
  +0.0%     +13  [ = ]       0    .strtab
  +0.0%      +6  [ = ]       0    .debug_line
  +0.0%      +4  +0.0%      +4    .text
 -10.6%      -5  [ = ]       0    [Unmapped]
  +0.1% +5.94Ki  +0.0%     +36    TOTAL
use_config/rp2040 — 147.2 KiB → 147.2 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 135336	      0	  15372	 150708	  24cb4	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 135336	      0	  15372	 150708	  24cb4	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +4.15Ki  [ = ]       0    .debug_str
  +0.2% +1.55Ki  [ = ]       0    .debug_info
  +0.7%    +112  [ = ]       0    .debug_aranges
  +0.0%     +18  [ = ]       0    .strtab
  +0.0%     +12  [ = ]       0    .debug_loc
  +5.0%      +2  [ = ]       0    [Unmapped]
  -0.0%     -21  [ = ]       0    .debug_line
  +0.2% +5.82Ki  [ = ]       0    TOTAL
use_config/rp2040_split (central) — 160.4 KiB → 160.8 KiB (+0.20% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 148408	      0	  16228	 164636	  2831c	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 148116	      0	  16184	 164300	  281cc	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +4.48Ki  [ = ]       0    .debug_str
  +0.2% +2.71Ki  [ = ]       0    .debug_info
  +0.6% +2.14Ki  [ = ]       0    .debug_loc
  +0.9%    +800  [ = ]       0    .debug_ranges
  +0.2%    +383  [ = ]       0    .debug_line
  +0.2%    +292  +0.2%    +292    .text
  +0.7%    +112  [ = ]       0    .debug_aranges
  +0.0%     +52  [ = ]       0    .strtab
  [ = ]       0  +0.3%     +44    .bss
  +0.1%     +32  [ = ]       0    .symtab
  -6.6%      -4  [ = ]       0    [Unmapped]
  +0.3% +11.0Ki  +0.2%    +336    TOTAL
use_config/rp2040_split (peripheral) — 27.4 KiB → 27.8 KiB (+1.42% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  25624	     60	   2796	  28480	   6f40	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  25256	     60	   2764	  28080	   6db0	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.8% +5.65Ki  [ = ]       0    .debug_str
  +0.9% +3.46Ki  [ = ]       0    .debug_info
  +1.6%    +904  [ = ]       0    .debug_line
  +1.1%    +766  [ = ]       0    .debug_loc
  +1.8%    +372  +1.8%    +372    .text
  +1.8%    +296  [ = ]       0    .debug_ranges
  +3.6%    +214  [ = ]       0    .debug_abbrev
  +1.1%    +144  [ = ]       0    .debug_aranges
  +0.6%    +130  [ = ]       0    .strtab
  +1.3%    +112  [ = ]       0    .symtab
  +1.0%     +52  [ = ]       0    .debug_frame
  [ = ]       0  +1.8%     +32    .bss
   +42%     +18  [ = ]       0    [Unmapped]
  -0.1%      -4  -0.1%      -4    .rodata
  +0.9% +12.1Ki  +1.4%    +400    TOTAL
use_config/stm32f1 — 62.6 KiB → 62.6 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  56596	     28	   7504	  64128	   fa80	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  56596	     28	   7504	  64128	   fa80	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +1.58Ki  [ = ]       0    .debug_str
  +0.2% +1.10Ki  [ = ]       0    .debug_info
  +0.0%      +6  [ = ]       0    .debug_line
  -3.1%      -2  [ = ]       0    [Unmapped]
  +0.2% +2.68Ki  [ = ]       0    TOTAL
use_config/stm32h7 — 99.8 KiB → 99.8 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  92140	    268	   9736	 102144	  18f00	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  92144	    268	   9736	 102148	  18f04	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.76Ki  [ = ]       0    .debug_str
  +0.2% +1.43Ki  [ = ]       0    .debug_info
  +0.0%     +13  [ = ]       0    .debug_line
  +1.8%      +1  [ = ]       0    [Unmapped]
  -0.0%      -4  -0.0%      -4    .text
  +0.1% +3.20Ki  -0.0%      -4    TOTAL
use_rust/nrf52832_ble — 359.6 KiB → 359.6 KiB (+0.01% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 329588	   5264	  33400	 368252	  59e7c	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 329548	   5264	  33368	 368180	  59e34	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +2.98Ki  [ = ]       0    .debug_str
  +0.1%    +136  [ = ]       0    .debug_ranges
  +0.3%    +112  [ = ]       0    .debug_aranges
  +0.0%     +40  +0.0%     +40    .text
  [ = ]       0  +0.1%     +32    .bss
  +0.0%     +32  [ = ]       0    .symtab
  +0.0%     +26  [ = ]       0    .strtab
  +0.1%     +24  [ = ]       0    .debug_frame
 -17.6%      -9  [ = ]       0    [Unmapped]
  -0.2%     -17  [ = ]       0    .debug_abbrev
  -0.1%    -302  [ = ]       0    .debug_line
  -0.1%    -753  [ = ]       0    .debug_loc
  -0.1% -1.07Ki  [ = ]       0    .debug_info
  +0.0% +1.22Ki  +0.0%     +72    TOTAL
use_rust/nrf52840_ble — 417.8 KiB → 418.1 KiB (+0.06% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 376140	   5264	  46696	 428100	  68844	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 375884	   5264	  46656	 427804	  6871c	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +5.59Ki  [ = ]       0    .debug_str
  +0.1% +2.26Ki  [ = ]       0    .debug_info
  +0.1%    +412  [ = ]       0    .debug_loc
  +0.1%    +240  +0.1%    +240    .text
  +0.3%    +120  [ = ]       0    .debug_aranges
  +0.0%     +48  [ = ]       0    .debug_ranges
  +0.0%     +42  [ = ]       0    .debug_line
  [ = ]       0  +0.1%     +40    .bss
  +0.0%     +24  [ = ]       0    .strtab
  +0.0%     +20  [ = ]       0    .debug_frame
  +0.0%     +16  +0.0%     +16    .rodata
  -1.9%      -1  [ = ]       0    [Unmapped]
  -0.3%     -24  [ = ]       0    .debug_abbrev
  +0.1% +8.72Ki  +0.1%    +296    TOTAL
use_rust/nrf52840_ble_split (central) — 506.6 KiB → 506.5 KiB (-0.02% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 459276	   6588	  52768	 518632	  7e9e8	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 459440	   6588	  52728	 518756	  7ea64	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +6.45Ki  [ = ]       0    .debug_str
  +0.1% +3.00Ki  [ = ]       0    .debug_info
  +0.3%    +768  [ = ]       0    .debug_ranges
  +0.1%    +449  [ = ]       0    .debug_line
  +0.1%    +229  [ = ]       0    .strtab
  +0.1%    +176  [ = ]       0    .symtab
  +0.3%    +144  [ = ]       0    .debug_aranges
  +0.2%    +100  [ = ]       0    .debug_frame
  [ = ]       0  +0.1%     +40    .bss
  +0.0%     +16  +0.0%     +16    .rodata
   +12%      +8  [ = ]       0    [Unmapped]
  -0.7%     -58  [ = ]       0    .debug_abbrev
  -0.0%    -180  -0.0%    -180    .text
  -0.1% -1.03Ki  [ = ]       0    .debug_loc
  +0.1% +10.0Ki  -0.0%    -124    TOTAL
use_rust/nrf52840_ble_split (peripheral) — 319.0 KiB → 319.6 KiB (+0.20% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 295576	   5360	  26360	 327296	  4fe80	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 294992	   5360	  26272	 326624	  4fbe0	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +7.39Ki  [ = ]       0    .debug_str
  +0.1% +2.00Ki  [ = ]       0    .debug_info
  +0.2% +1.20Ki  [ = ]       0    .debug_loc
  +0.2%    +568  +0.2%    +568    .text
  +0.2%    +416  [ = ]       0    .strtab
  +0.2%    +240  [ = ]       0    .symtab
  +0.1%    +168  [ = ]       0    .debug_ranges
  +0.4%    +160  [ = ]       0    .debug_aranges
  +0.3%    +100  [ = ]       0    .debug_frame
  [ = ]       0  +0.3%     +88    .bss
  +0.0%     +16  +0.0%     +16    .rodata
 -16.7%      -8  [ = ]       0    [Unmapped]
  -0.0%     -83  [ = ]       0    .debug_line
  +0.2% +12.1Ki  +0.2%    +672    TOTAL
use_rust/pi_pico_w_ble — 659.9 KiB → 659.9 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 619976	      0	  55748	 675724	  a4f8c	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 619984	      0	  55716	 675700	  a4f74	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +3.38Ki  [ = ]       0    .debug_str
  +0.1% +1.39Ki  [ = ]       0    .debug_info
  +0.3%    +112  [ = ]       0    .debug_aranges
  +0.0%     +47  [ = ]       0    .debug_loc
  [ = ]       0  +0.1%     +32    .bss
  +0.0%     +13  [ = ]       0    .strtab
  -0.0%      -4  [ = ]       0    .debug_line
  -0.0%      -8  -0.0%      -8    .text
 -42.4%     -28  [ = ]       0    [Unmapped]
  +0.1% +4.89Ki  +0.0%     +24    TOTAL
use_rust/rp2040 — 147.2 KiB → 147.2 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 135520	      0	  15252	 150772	  24cf4	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 135516	      0	  15252	 150768	  24cf0	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +4.17Ki  [ = ]       0    .debug_str
  +0.2% +1.62Ki  [ = ]       0    .debug_info
  +0.7%    +112  [ = ]       0    .debug_aranges
  +0.0%     +32  [ = ]       0    .debug_loc
  +0.0%     +18  [ = ]       0    .strtab
  +0.0%      +4  +0.0%      +4    .text
  -7.3%      -4  [ = ]       0    [Unmapped]
  -0.0%     -10  [ = ]       0    .debug_line
  +0.2% +5.94Ki  +0.0%      +4    TOTAL
use_rust/rp2040_split (central) — 159.6 KiB → 160.0 KiB (+0.21% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 147804	      0	  16004	 163808	  27fe0	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 147492	      0	  15964	 163456	  27e80	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +4.42Ki  [ = ]       0    .debug_str
  +0.2% +2.63Ki  [ = ]       0    .debug_info
  +0.7%    +608  [ = ]       0    .debug_ranges
  +0.1%    +401  [ = ]       0    .debug_loc
  +0.2%    +352  [ = ]       0    .debug_line
  +0.2%    +312  +0.2%    +312    .text
  +0.4%    +128  [ = ]       0    .symtab
  +0.7%    +112  [ = ]       0    .debug_aranges
  +0.1%     +70  [ = ]       0    .strtab
  [ = ]       0  +0.3%     +40    .bss
   +29%     +12  [ = ]       0    [Unmapped]
  +0.2% +9.00Ki  +0.2%    +352    TOTAL
use_rust/rp2040_split (peripheral) — 27.8 KiB → 28.1 KiB (+1.23% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  25696	     60	   3060	  28816	   7090	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  25376	     60	   3028	  28464	   6f30	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.8% +5.65Ki  [ = ]       0    .debug_str
  +0.9% +3.47Ki  [ = ]       0    .debug_info
  +2.5% +1.64Ki  [ = ]       0    .debug_loc
  +1.5%    +860  [ = ]       0    .debug_line
  +3.2%    +520  [ = ]       0    .debug_ranges
  +1.6%    +324  +1.6%    +324    .text
  +3.7%    +214  [ = ]       0    .debug_abbrev
  +1.1%    +144  [ = ]       0    .debug_aranges
  +0.6%    +130  [ = ]       0    .strtab
  +1.3%    +112  [ = ]       0    .symtab
  +1.0%     +52  [ = ]       0    .debug_frame
  [ = ]       0  +1.6%     +32    .bss
  -1.9%      -1  [ = ]       0    [Unmapped]
  -0.1%      -4  -0.1%      -4    .rodata
  +1.0% +13.1Ki  +1.2%    +352    TOTAL
use_rust/stm32f1 — 62.6 KiB → 62.6 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  56636	     28	   7480	  64144	   fa90	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  56640	     28	   7480	  64148	   fa94	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +2.00Ki  [ = ]       0    .debug_str
  +0.2%    +931  [ = ]       0    .debug_info
   +14%      +7  [ = ]       0    [Unmapped]
  +0.0%      +4  [ = ]       0    .debug_line
  -0.0%      -4  -0.0%      -4    .text
  +0.2% +2.92Ki  -0.0%      -4    TOTAL
use_rust/stm32h7 — 121.2 KiB → 121.2 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 108260	    324	  15524	 124108	  1e4cc	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 108256	    324	  15524	 124104	  1e4c8	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +4.20Ki  [ = ]       0    .debug_str
  +0.1% +1.59Ki  [ = ]       0    .debug_info
  +0.1%    +171  [ = ]       0    .debug_line
  +0.3%    +104  [ = ]       0    .debug_aranges
  +0.0%      +4  +0.0%      +4    .text
  -0.0%      -1  [ = ]       0    .strtab
 -13.0%      -6  [ = ]       0    [Unmapped]
  -0.0%     -10  [ = ]       0    .debug_loc
  +0.2% +6.04Ki  +0.0%      +4    TOTAL

@Schievel1 Schievel1 force-pushed the add-pointing-modes branch from ee9d20b to 288b10c Compare June 5, 2026 19:33
@Schievel1

Schievel1 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

alrighty. Test fail, I will take care of this later.

In qmk I used to have integration scrolling mode. When in this mode, the trackball not just acts like a scroll wheel, but instead when you move it in one direction, and leave it there, it keeps scrolling. (even though the trackball is not rolled anymore) I never got the hang of it, but some people found it extremely useful for having autoscroll in programs that do not automatically support it. They set up a PDF, activate this slow scroll in their reading pace and start reading. Shall we implement that as well?

Also there's caret mode, which basically emits arrow keys when moving the trackball. Useful to move the cursor in text documents.

More info on those: https://codeberg.org/Schievel/dactyl_manuform_r_track#headline-26

I looked into this, and caret makes sense to implement. But integration mode is a thing that kind of just falls into place for QMK, because of the way QMK does things with polling and mouse reports.
But for event based RMK it is way too complicated to implement for such a seldom used feature. Therefore I dropped the idea. If someone needs integration mode, they can do their own PointingProcessor and use that.

@Schievel1 Schievel1 force-pushed the add-pointing-modes branch from 26cb0af to f6f024d Compare June 5, 2026 22:02
@Schievel1 Schievel1 force-pushed the add-pointing-modes branch from f6f024d to 1e85256 Compare June 5, 2026 22:30
@Schievel1 Schievel1 marked this pull request as ready for review June 5, 2026 22:33
@Schievel1 Schievel1 requested a review from HaoboGu June 5, 2026 22:39

@kot149 kot149 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. A few comments from me:

Comment thread docs/docs/main/docs/configuration/input_device/pmw3610.mdx Outdated
Comment thread docs/docs/main/docs/configuration/input_device/pmw3610.mdx Outdated
Comment thread docs/docs/main/docs/configuration/input_device/pmw33xx.mdx Outdated
Comment thread docs/docs/main/docs/configuration/input_device/pmw3610.mdx Outdated
Comment thread rmk/src/input_device/pointing.rs
Comment thread docs/docs/main/docs/configuration/input_device/pmw3610.mdx Outdated
Comment thread rmk/src/event/input.rs Outdated
Comment thread rmk/src/input_device/pointing.rs
Comment thread rmk/src/input_device/pointing.rs
@Schievel1 Schievel1 requested a review from kot149 June 11, 2026 23:00
Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants