hotkeys sometimes don't work
Posted: 18 Jan 2019, 16:31
I have the following script to switch my windows key and alt key:
My problem is, when I try to alt-tab with my new hotkey using win-tab, sometimes it doesn't work. I notice this especially when I try to alt-tab after not using the hotkey for awhile - it will only register the tab.
Why is this? I got #UseHook from another post, but it didn't help. If the answer to this has already been posted somewhere, please let me know where to go.
Code: Select all
#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
LAlt::LWin
LWin::LAlt
return
Why is this? I got #UseHook from another post, but it didn't help. If the answer to this has already been posted somewhere, please let me know where to go.