1

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.

Sergey
  • 13
  • 2
  • Are you sure that it's the Windows key? Does it even have the Windows logo on it? The real Fn key belongs to the keyboard controller and the OS has no idea what that key is. See [How do you disable the Fn key on a keyboard in Windows?](https://superuser.com/q/1434881/241386) – phuclv Mar 10 '20 at 08:37

1 Answers1

4

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.

gronostaj
  • 55,965
  • 20
  • 120
  • 179