简体   繁体   English

窗口和Alt热键

[英]Window and Alt hotkey

What I'm trying to do 我想做什么

# & LeftAlt::
Send #1
return

I've tried other variations such as (# & !) and (#LeftALt) etc. 我尝试了其他变体,例如(#&!)和(#LeftALt)等。

I read a few documentation pages but didn't find anything useful except a few less complex examples that don't explain the syntax subtleties. 我阅读了一些文档页面,但是除了一些不太复杂的示例没有解释语法的细微差别外,没有发现任何有用的东西。 Would be really nice if I could have help on this simple hotkey and not have to go head first in reference docs in a language I'll hardly ever use in the future 如果我可以在这个简单的热键上获得帮助,而不必先使用我以后将不再使用的语言来撰写参考文档,那将非常好

Got it> 知道了>

#LAlt::
Send #1
return

Adding this as an answer, as I don't have enough rep to leave a comment. 将此添加为答案,因为我没有足够的代表发表评论。 So MCL's statement doesn't cause any confusion to newer AHK users, you can in fact use modifier keys together. 因此,MCL的声明不会对AHK的新用户造成任何困扰,实际上您可以一起使用修饰键。 The catch is that you must reference them as keys instead of as modifiers. 要注意的是,您必须将它们引用为键而不是修饰符。

LWin & LAlt::Send, #1

The above example works correctly, just as cblupo's edit does. 上面的示例可以正常工作,就像cblupo的编辑一样。 The difference is that cblupo is using a modifier (#) whereas my example references the keys directly (LWin). 区别在于cblupo使用修饰符(#),而我的示例直接引用了键(LWin)。

A better example, working on the same concept, may be: 一个处理相同概念的更好的例子可能是:

LAlt::MsgBox, This works.
!::MsgBox, This does nothing.

Hope this helps to clear up any misinformation. 希望这有助于清除任何错误信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM