我有这个绘画程序,当你按住
control
时,移动工具暂时变成活动工具。
我正在尝试创建两个热键来减少画笔大小:
#SingleInstance, force
^wheelup::
tooltip, Ctrl + WheelUp
;Sendinput, {[} ;Increase brush size
return
^wheeldown::
tooltip, Ctrl + Wheeldown
;Sendinput, {]} ;Reduce brush size
return
我正在使用
tooltip
命令来演示我的问题。
但是程序注意到
control
键被按住/按下,因此使移动工具成为活动工具,从而无法更改画笔大小。 这段录音说明了我的意思
我尝试应用
$
前缀,但程序仍然看到 control
并切换到移动工具:
#SingleInstance, force
$^wheelup::
tooltip, Ctrl + WheelUp
;Sendinput, {[} ;Increase brush size
return
$^wheeldown::
tooltip, Ctrl + Wheeldown
;Sendinput, {]} ;Reduce brush size
return
有没有办法让 AHK 在绘画程序中“隐藏”按下或按住
control
?
您可以禁用此程序中的一个控制键,并使用另一个控制键来激活移动工具:
#Requires AutoHotkey v1.1
#IfWinActive ahk_exe program.exe
; disable the left Control key in this program
LCtrl::return
; left Control + wheel
<^wheelup:: tooltip Ctrl + WheelUp
<^wheeldown:: tooltip Ctrl + Wheeldown
#IfWinActive ; turn off context sensitivity
将
program.exe
替换为程序的 ahk_exe。