keyboard-shortcuts - 让 win+m 后跟 win+p 执行代码
问题描述
我应该怎么做才能通过以下方式执行一些代码(即:)MsgBox "Hello"
:
按win+m
解压m而不解压win
- 紧迫p
解决方案
试试这个:
<#m:: ; "<#" means "LWin"
LWin_m := true ; assign the Boolean value "true" or "1" to this variable
KeyWait, LWin, L ; wait for LWin to be released
LWin_m := false
return
<#p::
If (LWin_m) ; If this variable has the value "true"
msgbox "Hello"
; else
; do sth else
return
编辑:
为了不失去正常win+m
,win+p
试试这个:
<#m:: ; "<#" means "LWin"
LWin_m := true ; assign the Boolean value "true" or "1" to this variable
KeyWait, LWin, L ; wait for LWin to be released
If (A_PriorKey = "m")
Send #m
LWin_m := false
return
<#p::
If (LWin_m) ; If this variable has the value "true"
msgbox "Hello"
else
Send #p
return
推荐阅读
- c# - 在 ASP.net core mvc 3.1 中的 HtmlHelper 扩展方法中使用 DataAnnotation 本地化器
- mysql - 有没有办法在 MySQL 数据库记录中设置特殊字符?
- spring-boot - 在 JPA 中使用 findBy 时如何忽略某些列
- android - 编写 Kotlin 扩展函数时出错
- c# - 区分 C# vsto 中自定义安装的字体和 Office 应用程序内置(默认)字体
- javascript - 如何使 JavaScript 在 Wordpress 正文中工作?需要包起来吗?
- node.js - 在nodejs mqtt重新连接中没有收到以前的消息
- apache-kafka - Flink 数据流转换和暴露到 REST 端点
- r - 在 R 中,如何找到列中包含任何值的行
- android - 检查来自json的条件