Page 1 of 1

How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 6:27 am
by xmau
Please fill in this template when posting!
XMBC Version: 2.20b4
Installed or Portable version: Installed
Windows Version: 7
Mouse Information (brand/model): Logitech M585
Relevant Computer Information (CPU, RAM etc): Intel, 8GB
How long have you used XMBC?: 2yr
What language and keyboard layout do you use in Windows?: English US

I use the right-button to Chord to layer-2 for Wheel up/down to adjust volume.

But as I like to leave the scroll lines at 3, the volume control jumps by a 6 ticks.

How can I set it or script it by 'Simulated Keystrokes?' to temporary have the wheel scroll finely by 1 unit when doing above chord?

Hope I made myself clear. :)

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 8:36 am
by xmau
Further observation:

If scroll lines @ 3lines, the volume control by mouse wheel will skip by: 0-9-18-27 etc for each wheel click on my Logitech M585.

I also found my keyboard's media volume keys will adjust by 2 steps: 0-2-4-6-8

So as workaround for finer control of volume, I mapped mouse button 4 & 5 to 'Media volume up/down' for more reliable fine adjustment.

But if mouse wheel number of lines can be on-the-fly change by a special keyword in 'Simulated keystrokes' that will be great.

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 9:08 am
by phil
Yeh the Volum Up/Down AND simulated keys {vol} commands all just send the keyboard volume keys, so whatever they do is all XMBC can do at the moment. I have no idea if those keys are configurable. Its never been a problem for me as I don't need 100 levels of volume (I'm not sure I've ever had an amplifier either with that many volume increments!)

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 11:01 am
by xmau
Currently my volume 0 to 100 only has ~11 steps if control by mouse wheel, very coarse.

The reason for finer control is to find just the right volume level to avoid triggering the Mrs' ears :x .

Since XMBC can control 'wheel scroll lines', I was looking for a 'tag' that can for example "{WheelLines:1}VOL+{WheelLines:3}", but looks like there isn't such a tag.

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 2:19 pm
by phil
OK Yes I see the problem.

For each single "notch" scroll, XMBC receives <Number of Lines> messages from Windows... So it sends <number of lines> volume keys, reducing the accuracy. I'm not sure changing the number of lines is the answer here (as that is rather inefficient as it has to broadcast a system settings change to the whole system (every window) so doing that quickly in a simkey sequence might be bad (slow)). It might be better to simply ignore the repeated scroll message (as in, ignore every <number of lines-1> messages) in the simkey code.

I think the same will apply to any simkey mapping if the wheel is redirected, not just volume! If you set wheel up to paste, you would get three pastes, not one, or set it to send the letter 'a' and you get three a's not one! It should NOT do that.

I'll raise a bug report and add it to the list of things to fix!

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 2:28 pm
by phil
I'm wrong, it gets a single scroll message per nothch (as I thought it was supposed to) but then it goes and gets the number of lines, and repeats the action that many times - doh!

Thats clearly done for a reason - I will have to investigate what the reason was, otherwise changing it will likely break something else.
So its a proper XMBC bug!

EDIT: Ive just realized your using 2.20 beta 4 - I think this is a known problem (has been reported before).
It wasn't a problem in the last release!

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 2:53 pm
by xmau
I don't think it is a XMBC bug too. As the number or lines sent per wheel click is a Windows setting, I also recall reading you mentioning XMBC simply set that Windows setting without doing anything fancy.

The workaround using other buttons to Vol+ and Vol- should suffice for now. Wasn't aware of the system impact of broadcasting this everywhere.

Thanks for explaining. And I'll switch back to the stable version to try.

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 3:41 pm
by phil
It IS an XMBC bug. It worked FINE before 2.20 beta 4.
2.20 Beta 4 included a "fix" for smooth scrolling which actually broke this. Its a known problem that I hadn't gotten around to fixing.
Ive fixed it now so beta 5 will be all good again.

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 4:25 pm
by xmau
Good that you fixed it that.

I reverted back to stable ver and everything is working as expected.

Re: How to mouse scroll finely when changing volume?

Posted: Fri Aug 12, 2022 9:16 pm
by phil
You can try 2.20 beta 5 if you want (which includes my fix earlier among a few others)

Re: How to mouse scroll finely when changing volume?

Posted: Sat Aug 13, 2022 5:37 pm
by xmau
I tried beta 5 and went back to stable.

Beta 5 - each wheel notch = 3 steps in volume change :|
Stable - each wheel notch = 1 step in volume change :D

Re: How to mouse scroll finely when changing volume?

Posted: Sat Aug 13, 2022 8:27 pm
by phil
Thats odd - its working here, at least it works for volume UP. I have found though that volumne down (using the keyboard key and XMBC) gets accelerated after 4 or 5 nothes then it shoots down really quick (does not do this going up). Turns out this is a Windows "feature" lol - who knew

I intend to "fix" that windows feature at least when changing the volume in XMBC - but I don't see what you are describing in Beta 5. For me, one 'notch' sends one volume key press (Beta 4 it sent 3 keys - that was the problem that beta 5 *should* have fixed - and has for me).

If you hadnt rolled back to 2.19.2 I'd have asked for the debug log - but nevermind for now, I'll have a look and see what I can find.

Re: How to mouse scroll finely when changing volume?

Posted: Tue Sep 27, 2022 1:16 pm
by kunalvid
The reason for finer control is to find just the right volume level to avoid triggering the Mrs' ears