AutoHotKey 在 Win10 上无法获取正确的 Windows 键 (Fn)

1 autohotkey windows-10

我正在尝试制作一个脚本,通过分别按右 Windows 键(键盘上称为 Fn)和 F9-F11 键来静音\取消静音所有声音并增加\减少音量。我使用的是 Windows 10。问题是我找不到 Fn 键的正确代码。我已经尝试过这些:

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)
Run Code Online (Sandbox Code Playgroud)

什么都不起作用。仅使用 F9 而不尝试添加正确的 win 键效果很好,但这不是我想要的。请指教。

gro*_*taj 5

Fn不是正确的Win钥匙。它甚至不会像其他密钥一样传递到操作系统 - 它会在硬件级别修改其他密钥。操作系统甚至不知道它的Fn存在。

例如,戴尔笔记本电脑的F1按键上有静音符号。但按Fn+F1不会发送Fn+F1键码 - 它会发送Mute.

如果您的键盘没有Fn内置 +[something] 快捷键,您将无法使用它。如果是这样,您必须捕获组合的键码。