Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Volume change by mouse wheel everywhere (Read 2000 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Volume change by mouse wheel everywhere

Is it possible to make foobar2000 accept mouse wheel
for volume change not only when the mouse is at the control,
but every time when foobar2000 has the focus?

I find it unnecessary uncomfortable to have to position the mouse
to that small control if I want to change the volume.
Even more as mouse scrolling doesn't have other functions
elsewhere (if I'm right).
I found no way at keyboard shortcuts.

Re: Volume change by mouse wheel everywhere

Reply #1
Not sure if this is possible, and it may lead to some issues - for example scrolling playlists.

In the Keyboard Shortcuts config there is entire section dedicated to volume control ( [Main]->Playback->Volume), so this workaround is definitely possible.

Re: Volume change by mouse wheel everywhere

Reply #2
Yes, you are right, scrolling the playlist would conflict.

But say I would like to override the above behaviour
and want to have the mouse wheel for volume control
everywhere in foobar (scrolling the playlist still would
do by the scroll bar)...

How would I enter this in the keyboard shortcuts section?
The point is: I don't know how to enter "mouse up" in
the "key" field. (???)

Re: Volume change by mouse wheel everywhere

Reply #3
The best you can do is define keyboard shortcuts instead.

Re: Volume change by mouse wheel everywhere

Reply #4
Thanks for your answer.
Still ...

If I ask how to do a thing, it's not too nice to get:
"Do another thing".
I DO have my reasons why I would want the mouse wheel.
So... again:

Is it possible to assign mouse actions to foobar2000 functions?
(The best you can do is to answer that question  ;)  )

Re: Volume change by mouse wheel everywhere

Reply #5
Maybe with another program? (sorry, I know I'm not answering the question precisely, but otherwise I don't see how to do it)
I use X-Mouse Button Control and AutoHotkey. I tried both quickly and it seems to work.
I noticed a difference: with X-Mouse it works if the cursor is over the window, even if it is inactive. With AutoHotkey, you have to click once on the window, and it stays active if the cursor goes somewhere else, as long as I haven't clicked on another window, it can be annoying. I tried this script (I don't know if it is good, I am a beginner. Maybe Returns are not necessary):
Spoiler (click to show/hide)
Many things are possible with AutoHotkey, there are probably commands to have a different behavior. I don't know enough about it. There are surely answers in the documentation or on the forums.

Re: Volume change by mouse wheel everywhere

Reply #6
Hi :)

Show volume in Statusbar (right clic > Show volume).
mouse wheel is enabled
And foobar Show/Hide: taskbar icon one clic.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: Volume change by mouse wheel everywhere

Reply #7
I can use my remote control to control volume. It uses surely command line options: foobar2000.exe /command:"Volume up",  foobar2000.exe /command:"Volume down",  foobar2000.exe /command:"Mute"

Re: Volume change by mouse wheel everywhere

Reply #8
Thank you very much for all your help!  :)

So the answer is that it is not possible to configure fb
to accept volume control by mouse wheel whenever
fb is on focus.
The workaround seems to be to drive fb from outside
with AutoHotkey etc.

I've been using MPC-HC for many years and found
it very comfortable to pause by spacebar and to
control volume by mouse wheel (and don't have to
precise position the mouse on the control).
Best would be a remote control indeed.  ;)

Thanks again!

Re: Volume change by mouse wheel everywhere

Reply #9
Below is a very simple AutoHotKey script that I use to achieve what you are asking. It changes the behaviour of the scroll wheel while the cursor is over the Taskbar (in my case on the left hand side but I don't think that matters).
Wheel up = Volume up
Wheel down = Volume down
L button= Mute
R button = Pause
Actually I had forgotten the button functions so its lucky that this post reminded me.



/*
ChangeVolume.ahk for AutoHotkey V1.1

Simply scroll the mouse wheel up or down while hovering over
Windows Systems Taskbar to adjust the Windows speaker volume.
The script uses conditional directives to isolate the mouse scroll
wheel as a Hotkey.

For AutoHotkey V2.0, see ChangeVol.ahk2
*/

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#If MouseIsOver("ahk_class Shell_TrayWnd")
   WheelUp::Send {Volume_Up}
   WheelDown::Send {Volume_Down}
   ^Lbutton::Send {Volume_Mute}
   ^Rbutton::Send {Media_Play_Pause}
#If

MouseIsOver(WinTitle)
{
   MouseGetPos,,, Win
   Return WinExist(WinTitle . " ahk_id " . Win)
}