0

I'm trying to make a script that mutes\unmutes all sound and increases\decreases volume by pressing right windows key (called Fn on my keyboard) AND F9-F11 keys respectively. I'm using Windows 10. The problem is I can't find the correct code for Fn key. I've tried these:

RWin & F9::SoundSet, +1, , mute  ; Toggle the master mute (set it to the opposite state) 

RWin::LWin
LWin & F9::SoundSet, +1, , mute  ; Toggle the master mute (set it to the opposite state)

># & F9::SoundSet, +1, , mute  ; Toggle the master mute (set it to the opposite state)

>#F9::SoundSet, +1, , mute  ; Toggle the master mute (set it to the opposite state)

Nothing works. Using only F9 without trying to add the right win keys works fine, but that's not what I want. Please advice.

3

Fn is not the right Win key. It's not even passed to OS like other keys - it modifies other keys at hardware level. OS isn't even aware that Fn exists.

For example Dell laptops have mute symbol on F1 key. But pressing Fn+F1 doesn't send Fn+F1 keycode - it sends Mute.

If your keyboard doesn't have a Fn+[something] shortcut built in, you won't be able to use it. If it does, you have to capture the combined keycode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.