Skip to content

Add PageUp/PageDown/Home/End navigation - #65

Open
HoneyHazard wants to merge 1 commit into
tsowell:mainfrom
HoneyHazard:pgup-pgdown-navigation
Open

Add PageUp/PageDown/Home/End navigation#65
HoneyHazard wants to merge 1 commit into
tsowell:mainfrom
HoneyHazard:pgup-pgdown-navigation

Conversation

@HoneyHazard

@HoneyHazard HoneyHazard commented Aug 5, 2026

Copy link
Copy Markdown

⚠️ Full Disclosure: Drafted with AI assistance (Claude); reviewed by me briefly. I am neither a RUST developer nor pipewire expert. If I should stop making these PRs into your wonderful project, please let me know. ⚠️

That being said, I hope these can be helpful and useful additions that users could appreciate.


wiremix had no way to move the selection by more than one item at a time - only MoveUp/MoveDown (j/k, arrows), which is slow to navigate with on a system with many devices/streams. PageUp/PageDown/Home/End are all listed as valid SpecialKey values in the keybinding docs, but no actions existed that did anything more than single-item movement, so binding them to the existing MoveUp/MoveDown actions wouldn't have given real paging/jump behavior.

Adds four new actions, bound by default to the matching keys:

  • PageUp/PageDown jump the selection by however many items are currently visible on screen (ObjectList already computes this every frame for scroll positioning - now cached as page_size and reused for paging), clamping to the first/last item if the page would overrun the list.
  • MoveFirst/MoveLast (Home/End) jump straight to the first/last item, reading directly from View::object_ids() rather than walking one item at a time.
  • All four are also wired into the help menu's scroll (a fixed 10-line step for PageUp/PageDown there, and 0/u16::MAX for Home/End relying on HelpWidget::render()'s existing bottom-of-list clamp - the help view doesn't track a visible-line count the way the main object lists do).

New default keybindings:

keybindings = [
 # Select the item a page down (however many items are visible at once)
 { key = "PageDown", action = "PageDown" },
 # Select the item a page up
 { key = "PageUp", action = "PageUp" },
 # Select the last item
 { key = "End", action = "MoveLast" },
 # Select the first item
 { key = "Home", action = "MoveFirst" },
]

Like every other default binding, these are fully overridable/removable from the config file (e.g. { key = "PageDown", action = "Nothing" } to disable).

Tested:

  • cargo test: 150/150 passing, including 6 new tests covering page movement, first/last jumps, overflow-clamping at both ends, and the help-menu case for all four actions
  • cargo fmt --check / cargo clippy -- -D warnings / cargo doc (matching this repo's CI): all clean
  • Manual verification in a live terminal at two different sizes - one where paging overflows to the list's end, one where it's a real mid-list jump

wiremix had no way to move the selection by more than one item at a
time - only MoveUp/MoveDown (j/k, arrows), which is slow to navigate
with on a system with many devices/streams. PageUp/PageDown/Home/End
are all listed as valid SpecialKey values in the keybinding docs, but
no actions existed that did anything more than single-item movement,
so binding them to the existing MoveUp/MoveDown actions wouldn't have
given real paging/jump behavior.

Adds four new actions, bound by default to the matching keys:

- PageUp/PageDown jump the selection by however many items are
  currently visible on screen (ObjectList already computes this every
  frame for scroll positioning - now cached as `page_size` and reused
  for paging), clamping to the first/last item if the page would
  overrun the list.
- MoveFirst/MoveLast (Home/End) jump straight to the first/last item,
  reading directly from View::object_ids() rather than walking one
  item at a time.

All four are also wired into the help menu's scroll (a fixed 10-line
step for PageUp/PageDown there, and 0/u16::MAX for Home/End relying on
HelpWidget::render()'s existing bottom-of-list clamp - the help view
doesn't track a visible-line count the way the main object lists do).

Tested: cargo test (150/150 passing, including 6 new tests covering
page movement, first/last jumps, overflow-clamping at both ends, and
the help-menu case for all four actions), cargo fmt --check / cargo
clippy -- -D warnings / cargo doc (matching wiremix's CI) all clean,
manual verification in a live terminal at two different sizes (one
where paging overflows to the list's end, one where it's a real
mid-list jump).
@HoneyHazard
HoneyHazard force-pushed the pgup-pgdown-navigation branch from 81bea75 to 5b78490 Compare August 5, 2026 09:17
@HoneyHazard HoneyHazard changed the title Add PageUp/PageDown navigation Add PageUp/PageDown/Home/End navigation Aug 5, 2026
@HoneyHazard
HoneyHazard marked this pull request as ready for review August 6, 2026 08:10
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.

1 participant