Skip to content

Add custom page up/down keyboard selection in song select#36305

Closed
AndyBodnar wants to merge 2 commits intoppy:masterfrom
AndyBodnar:fix-page-navigation-song-select
Closed

Add custom page up/down keyboard selection in song select#36305
AndyBodnar wants to merge 2 commits intoppy:masterfrom
AndyBodnar:fix-page-navigation-song-select

Conversation

@AndyBodnar
Copy link
Copy Markdown

This implements custom page up/down handling in song select like peppy mentioned in the issue. Instead of using the standard scroll container behavior which just scrolls the view by a page, it now changes the keyboard selection by multiple items at once.

The page navigation moves the selection by 5 visible items at a time (this is configurable via the PageSelectionDistance property if we want to tweak it later). The implementation doesn't wrap around at the ends of the list, so pressing Page Down at the bottom just stays at the bottom rather than jumping back to the start.

I've also added some basic tests to verify the page navigation moves the selection by more than one item and doesn't wrap around.

Closes #36099

Instead of using the standard scroll container page up/down behavior
(which just scrolls the view), this implements keyboard selection-based
page navigation like in osu! stable. Pressing Page Up or Page Down now
moves the keyboard selection by multiple items (currently 5) rather
than simply scrolling the viewport.
Change `newIndex = newIndex - direction` to `newIndex -= direction`
@peppy
Copy link
Copy Markdown
Member

peppy commented Jan 12, 2026

Duplicate of #36293. Only one of these two should be merged.

@AndyBodnar
Copy link
Copy Markdown
Author

@peppy Thanks for flagging #36293 - I hadn't seen it when I started working on this.

A few differences in my implementation that might be worth considering:

Tests - This PR includes TestSceneBeatmapCarouselPageNavigation.cs with test coverage for the page navigation behavior

Configurability - Added a PageSelectionDistance property so the "items per page" can be tweaked later without code changes

Lines: +292 (vs +85) - the extra is mostly test coverage

That said, I'm happy to go whichever direction works best for the project. If you'd prefer to move forward with #36293, I can close this - just point me in the direction you want. Alternatively, I could contribute my tests to their PR if that's useful.

@AndyBodnar
Copy link
Copy Markdown
Author

Closing this one since #36293 covers the same feature. Makes more sense to focus efforts on a single PR rather than splitting review attention.

If the other PR needs any help with tests or anything else, happy to contribute there.

@AndyBodnar AndyBodnar closed this Jan 17, 2026
@AndyBodnar AndyBodnar deleted the fix-page-navigation-song-select branch January 17, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigating song select in lazer with page up/down key is different than stable/legacy osu

2 participants