如果按下快捷方式,如何获取热键定义?
How to get the hotkey definition if a shortcut is pressed?
例如,如果我按 Ctrl+Shift+Alt+C这个命令,我怎么得到对应的热键定义?
我希望得到如下结果:
; pseudo code
*::MsgBox %A_ThisHotkey% was pressed
我不太明白你的意思,这个
^+!c::MsgBox, % A_ThisHotkey
工作正常吗?
或者你的意思是这样的?
Gui, Add, Hotkey, vHotkeyName
Gui, Add, Button, gPrintHotkey, % "Print Hotkey"
Gui, Show
return
PrintHotkey()
{
global HotkeyName
Gui, Submit, NoHide
MsgBox, % HotkeyName
}
GuiClose()
{
ExitApp
}
例如,如果我按 Ctrl+Shift+Alt+C这个命令,我怎么得到对应的热键定义?
我希望得到如下结果:
; pseudo code
*::MsgBox %A_ThisHotkey% was pressed
我不太明白你的意思,这个
^+!c::MsgBox, % A_ThisHotkey
工作正常吗?
或者你的意思是这样的?
Gui, Add, Hotkey, vHotkeyName
Gui, Add, Button, gPrintHotkey, % "Print Hotkey"
Gui, Show
return
PrintHotkey()
{
global HotkeyName
Gui, Submit, NoHide
MsgBox, % HotkeyName
}
GuiClose()
{
ExitApp
}