我具有以下脚本来切换某些键,以便可以在Windows 10上使用Mac键盘:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#UseHook
#InstallKeybdHook
SetTitleMatchMode 2
SendMode Input
F7::SendInput {Media_Prev}
F8::SendInput {Media_Play_Pause}
F9::SendInput {Media_Next}
F10::SendInput {Volume_Mute}
F11::SendInput {Volume_Down}
F12::SendInput {Volume_Up}
LAlt::LWin
LWin::LAlt
return
我的问题是切换Windows键和Alt键(最后两行)。当我尝试使用win-tab用新的热键来alt-tab时,有时它不注册alt,而只注册。我注意到这一点尤其是在一段时间不使用热键后尝试按alt键时。为什么会这样?