Hey, all. I would like to emulate the Mac’s volume keys. Of course you can do this with the hardware volume controls available in UHK’s Agent. What I am asking about is the fine adjustment emulation.
On a Mac, you can press option-shift-volume+ to increment the volume in much finer steps than the typical volume up-down.
On my UHK, the volume controls are at the default location (Fn+I/K). I have tried option-shift-Fn-I but this does not do fine volume control.
Is there a way to do the fine volume control on a UHK? I need it because my monitor’s speakers are too quiet at 3, and too loud at 4, so I usually set the volume to 3.5~.
I did some searches and found references to emulating the hardware keys, but did not find anything about this.
Thanks.
I am confused as to what you mean by “hardware keys”.
The media scancodes are… normal scancodes. You can map them in combination with those modifiers or you can move them to wherever you will find it easier to press the required combination.
Sorry, I’m still very new to all this. I don’t know what scancodes are and really don’t understand how all this works.
Anyway, what I am trying to do is emulate the fine volume control that a Mac supports. On a Mac keyboard, one does this by pressing shift-option-{volumeup/volumedn}. Doing this gives much finer control of system volume.
On the UHK, volume control keys are Fn-I and Fn-K. I have tried shift-option-Fn-I and shift-option-Fn-K, and this does not result in fine grained volume control – it still does the regular volume jumps.
I tried capturing a keystroke in the Agent software, but when I press shift-option-volumeup on my Apple A1314 keyboard, the Agent does not see this, and the system volume changes.
I believe this is how you would set that up
2 Likes
Aha, that makes sense, but unfortunately it does not work – it just does the regular volume up/down.
Well, I tried both left shift/alt and right shift/alt, and it does not do the fine-grained volume control.
I think @Brian_Hayden is onto something… not sure why it doesn’t work. If it matters, I am running Agent 6.0.0 and Firmware 13.0.0.
Well, gpt says this: ChatGPT - Mac Fine Volume Control
Long story short, mac checks the vendor id and accepts that key combination only if your keyboard was made by apple.
Gpt may easily be hallucinating, so yo ushould cross check everything (for instance that your apple keyboard is sending the same media scancodes (the volume keys) as a standard keyboard.
If the above turns out accurate, then you may:
- file a bug report with apple customer service
- check apple window manager bindings
- bind a script in your window manager to some key combination and take care of the sought volume controls manually from there
I don’t know what scancodes are and really don’t understand how all this works.
Check out https://ultimatehackingkeyboard.com/blog/2018/06/23/how-can-i-type-accented-characters-with-my-uhk
Please note that scancodes and keycodes are two different things.
1 Like
@kareltucek Thank you so much. I should have checked with ChatGPT about that. 
I will read that about scancodes too.
I have Karabiner Elements installed, and will see if I can craft something with that. I’m also thinking of adding BetterTouchTool, which might also be useful here.
Be warned that Karabiner Elements is the number one culprit of most uhk-mac issues.
(Generally a lot of software, Karabiner included, doesn’t expect to receive scancodes in rapid bursts, or taps that remain for just a very short time.)
Thanks, I actully only had Karabiner Elements installed to convert the right option key to right control, and removing that rule gets me closer: sometimes the fine-grained control works directly from the UHK. I will play around with this more tonight. Thanks!