Repository navigation
Add volume control with right mouse button + scroll wheel - #4479
workingwithkwan wants to merge 3 commits into
Conversation
Hold the right mouse button over the player and use the scroll wheel to change the volume. New switch under Shortcuts > Volume, off by default. The amount per wheel notch is the existing "Step" slider (shortcuts_volume_step), shared with the volume shortcuts. - The page does not scroll during the gesture and no context menu appears afterwards. - Windows fires 'contextmenu' after 'mouseup'; Linux and macOS fire it right after 'mousedown'. There the player's menu is held back while the button is down and replayed on release if the wheel was not used. - A wheel-only shortcut does not fire on top of the gesture. - The setting applies to open tabs without a reload. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VnPaaESvf1EA3kfaCTrKV6
The volume shown when it is changed by the volume shortcuts or by right
mouse button + scroll wheel is now a whole number ("55" instead of
"55.00"), 30px, white on a black background of 20% opacity, horizontally
centered and 3/4 of the way up the player. It fades out within one
second and each new change restarts the fade.
showStatus() takes an optional type and duration for this; every other
status text keeps its format, position, colour, size and 500 ms.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VnPaaESvf1EA3kfaCTrKV6
|
hi! and thank you @workingwithkwan |
Replaces the separate "Hold right mouse button + scroll wheel" switch. The right mouse button is now part of the normal shortcuts: hold it while scrolling in the shortcut dialog and it is recorded together with the wheel (and with Alt / Ctrl / Shift or keys pressed before), for any shortcut, e.g. Increase volume = right mouse button + wheel up. - Menu (satus.js): the wheel recorder stores `context` when the right mouse button is held, shows it before the wheel, and suppresses the context menu while the dialog is open. - Menu (satus.js): the first scroll after opening the dialog replaces the shortcut that is shown instead of adding to it. Before, scrolling on "Increase volume" recorded "arrow up + wheel". - Page (shortcuts.js): `context` is matched like Alt / Ctrl / Shift, so "wheel" and "right mouse button + wheel" are different shortcuts. - The context-menu handling from the first commit moves into the shortcut listeners and only acts when a shortcut uses the right mouse button; without one, right-clicks are never touched. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VnPaaESvf1EA3kfaCTrKV6
|
@ImprovedTube2 Good point, thanks. I’ve reworked it: the separate switch is gone, and the right mouse button can now be recorded in the normal shortcut dialog. Hold it while scrolling and it is stored together with the wheel (also with Ctrl / Alt / Shift or keys), for any shortcut, e.g. Increase volume = right mouse button + wheel up. I also changed the dialog so that the first scroll replaces the shortcut that is shown instead of adding to it; scrolling on “Increase volume” used to record “arrow up + wheel”. The context-menu handling only acts when a shortcut uses the right mouse button. It’s the third commit. |
What this adds
The right mouse button can be part of a shortcut. Hold it while scrolling in the shortcut dialog and it is recorded together with the wheel, for any shortcut, e.g. Increase volume = right mouse button + wheel up, Decrease volume = right mouse button + wheel down.
Details
Second commit: volume text
The volume shown by the volume shortcuts and by this gesture is now a whole number ("55" instead of "55.00"), white on a 20% black background, centred horizontally and three quarters of the way up the player, and it fades out within one second. Other status texts (playback speed, filters) are unchanged. This is a matter of taste, so it is a separate commit that can be dropped.
Testing
🤖 Generated with Claude Code
https://claude.ai/code/session_01VnPaaESvf1EA3kfaCTrKV6