Skip to content

Rework, add, document, fix some issues with hotkeys.

Will Chen requested to merge intralexical/vvave:hotkeys into master

This MR adds the following keyboard hotkey shortcuts:

Key Action
Find (Ctrl+F) Toggle search box focus.
Space Toggle Play/Pause.
Left Seek 10 seconds back.
Right Seek 10 seconds forwards.
N Next track.
P Previous track.
Cancel (Escape) Contextual "Back" if sensible. Otherwise toggle focus view.
Next Child (Ctrl+Tab) Next tab.
Previous Child (Ctrl+Shift+Tab) Previous tab.
+ Increase volume.
- Decrease volume.
Shift+Enter Queue active track.
Menu Open context menu on on active item.
Up/Down Arrow When searching, set focus to the list.

These bindings are more similar to those used in, E.G., de-facto standard programs such as VLC and Youtube.

The goal is to be able to quickly navigate the entire program using the keyboard. It's not quite completely there yet, but IMO this change makes the interface much nicer to use if you're afraid of mice and touch.

To make these shortcuts more discoverable, this MR also adds a "Shortcuts" help popup to the main application menu, similar to what Nota has.

This MR also fixes/supersedes the following bugs that I believe previously existed in the keyboard shortcuts:

  • StandardKey.Back wasn't actually working to toggle the FocusView, at least on desktop.

  • Keys in FocusView stopped working if you gave the playlist view focus by interacting with it, and they didn't start working again until you closed and reopened Focus View.

  • The "CTRL+K" hotkey for forceActiveFocus() around FocusView.qml:35 looked like a hack, failed with ReferenceError: _filterField is not defined, and I think probably wouldn't have worked anyway since it's attached to the FocusView and might not get triggered unless focus is already active.

Minor issues not fixed in this MR:

  • "Return" key doesn't open active item in PlaylistsView or FolderView.

Merge request reports