Skype HotKeys真的很烦人,因为它们无法从Skype本身禁用。最令人讨厌的是Ctrl + R,如果选择了联系,则会与您的任何联系人发起Skype通话。这最近被Ctrl + Alt + R取代。
见http://community.skype.com/t5/Windows-desktop-client/Disable-CTRL-R-on-windows/td-p/2877763
不幸的是,我发现我将AltGr + R作为“è”字符的映射键(使用microsoft keybord creator)。因此,在我的所有应用程序中,我可以用美式键盘用法语愉快地写,使用AltGr + r一直用于我的“è”角色。现在除了Skype之外。
阅读上面的链接,我创建了一个AutoKey脚本,以禁用Skype的热键:
#IfWinActive, ahk_exe Skype.exe ; utilizes this script for Skype only
!^r:: ; replace [ctrl][alt][r] with nothing
#If ; closes IfWinActive condition, needed if more code comes after this
但是,虽然这会禁用Skype热键,但它会阻止我在Skype讨论中正常输入“è”字符。这么好,但不是最好的,因为我的打字现在在Skype中被破坏了。
我尝试了其他选择,但无济于事:
#IfWinActive, ahk_exe Skype.exe ; utilizes this script for Skype only
!^r::
Send è
return
#If ; closes IfWinActive condition, needed if more code comes after this
要么
#IfWinActive, ahk_exe Skype.exe ; utilizes this script for Skype only
!^r::
SendInput {Raw}è
return
#If ; closes IfWinActive condition, needed if more code comes after this
但是,一旦!^ r没有严格禁用,那么它就会启动Skype通话。
有更多使用AutoHotKey和/或Skype经验的人来帮助我吗?
谢谢。
请注意这一点
#IfWinActive, ...
!^r::
#If
没有有效的热键停用:附加return
关键字,因此它是!^r::return
。否则,在按下alt ctrl r之后,还将执行下面的任何代码。
此外,如果您只想重新映射AltGr热键,则应使用<^>!r::
作为触发器,如documentation中所建议的那样。这样,自然的alt+ctrl+r
行为将被保留,在这种情况下拨打电话。
我不能完全重现你的问题。
#IfWinActive, ahk_exe Skype.exe
<^>!r::
send a
return
#ifWinActive
对我来说效果非常好,并且不会在Skype中调用我的活动联系人。 AltGr
被正确覆盖。但是,如果我将send a
更改为send è
,脚本开始表现得很奇怪。它只适用于第一次:之后,我必须手动按Alt一次,以便再次发送è
。对我来说这看起来像个错误。
解决方法可能是
#IfWinActive, ahk_exe Skype.exe
<^>!r::
send è
keywait, alt
send {alt}
return
#ifWinActive
要么
#IfWinActive, ahk_exe Skype.exe
<^>!r::
keywait, alt
send è
return
#ifWinActive
。但这仍然无法在持有è
的同时发送多个altGr
。你必须在每个AltGr
之后释放è
。
编辑 - 我找到了100%可行的解决方案:
#IfWinActive, ahk_exe Skype.exe
<^>!r::
SendUnicodeChar(0x00E8)
return
#ifWinActive
; SOURCE for the following: http://www.autohotkey.com/board/topic/16404-inserting-unicode-special-characters/
SendUnicodeChar(charCode)
{
VarSetCapacity(ki, 28 * 2, 0)
EncodeInteger(&ki + 0, 1)
EncodeInteger(&ki + 6, charCode)
EncodeInteger(&ki + 8, 4)
EncodeInteger(&ki +28, 1)
EncodeInteger(&ki +34, charCode)
EncodeInteger(&ki +36, 4|2)
DllCall("SendInput", "UInt", 2, "UInt", &ki, "Int", 28)
}
EncodeInteger(ref, val)
{
DllCall("ntdll\RtlFillMemoryUlong", "Uint", ref, "Uint", 4, "Uint", val)
}
这与上面相同,但它不使用send è
或send {ASC 0232}
,而是使用unicode格式。
如果将“不幸”热键组合分配给其他内容,则可以避免整个问题。我做了什么:
它让我发疯,我在skype论坛上找到了合并的答案。