gpt4 book ai didi

keyboard-shortcuts - 使用 autohotkey 交换 Ctrl 和 Alt 并实现 Ctrl Tab

转载 作者:行者123 更新时间:2023-12-03 20:42:15 29 4
gpt4 key购买 nike

在使用 AutoHotKey 时,我想设置一个规则来交换左 alt 和左 ctrl。我可以这样做:

LAlt::LCtrl
LCtrl::LAlt

然后我想保持'alt tab'功能绑定(bind)这些物理键,因此我尝试了
LCtrl & Tab::AltTab

除了这两个uptop,它还不起作用。如果我这样说:
LCtrl & Tab::AltTab
LAlt::LCtrl
LCtrl::LAlt

然后选项卡将起作用,但是 ctrl alt 交换将被破坏。有什么建议么?

最佳答案

The hotkey documentation谈论通配符

Wildcard: Fire the hotkey even if extra modifiers are being held down. This is often used in conjunction with remapping keys or buttons. For example:

*#c::Run Calc.exe ; Win+C, Shift+Win+C, Ctrl+Win+C, etc. will all trigger this hotkey.

*ScrollLock::Run Notepad ; Pressing Scrolllock will trigger this hotkey even when modifer key(s) are down.


所以试试这个
*tab::
{ if(GetKeyState("LAlt", "P"))
{ Send {LControl up}{Alt down}{tab}
KeyWait, tab
}else
{ send {tab}
}
return
}
~LAlt Up::
{ send {lalt up}
return
}
LAlt::LCtrl
LCtrl::LAlt

关于keyboard-shortcuts - 使用 autohotkey 交换 Ctrl 和 Alt 并实现 Ctrl Tab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18454895/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com