autohotkey - 如何在 autohotkey 中设置箭头热键?

标签 autohotkey

我正在 AutoHotkey 中编写一个脚本,以允许我使用 Dell AT101W 键盘控制计算机的音量(因为 Windows 中没有设置用于控制此类内容的键,并且该键盘没有编入控件)。

到目前为止我所拥有的:

^!(whatever the up arrow is) ; What is up?
     SoundSet +2
^!(whatever the down arrow is) ; What is down?
     SoundSet -2

我不完全确定那里的音量命令是否正确,但我完全不知道如何让它识别向上和向下箭头键(我不知道它们是什么)。示例脚本值得赞赏,但绝不是必需的。

最佳答案

其实很简单,就是UpDown .

这是一个工作脚本,它设置一个托盘消息气球,在更改后通知您新卷:

^!Up::
     SoundSet +2
     GoSub DisplayCurrentVolume
     Return
^!Down:: 
     SoundSet -2
     GoSub DisplayCurrentVolume
     Return

DisplayCurrentVolume:
     SoundGet, volume
     volume := Ceil(volume) ; Round up
     TrayTip, Volume Adjusted, Volume changed to %volume%`%, 5, 1
     Return

关于autohotkey - 如何在 autohotkey 中设置箭头热键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26854680/

相关文章:

.net - 如何从 AutoHotKey 控制 .NET 复选框?

windows - 如何使用 autohotkey 在 Windows 10 中模拟超键

autohotkey - 如何检测 AutoHotKey 中的热键后的下一个按键

autohotkey - 使用 Autohotkey 模拟 Ctrl + 空格键 + AlphabeticalKey

excel - AutoHotKey - 如何获取列中最后使用的行的行号(自下而上)?

scope - 如何在 AutoHotkey 的热键中声明局部变量?

macros - AutoHotKey:#IfWinActive .* 资源管理器 *. ?在 Windows 7

visual-studio-code - 如何在vscode中一次将多行代码向左移动?

python - AutoHotKey 调用 Python 代码——有时有效,有时无效

keyboard - 如何在不按shift键的情况下使用键盘上的特殊字符?