Also, it seems that win+L cannot be mapped to anything since windows will always intercepts it.
In general it's frustrating that Windows is able to intercept my key mappings. For example if the taskmanager is the focused window, then all of my autohotkey bindings stop working .
Here is my script. I'm using windows 10.
Code: Select all
#SingleInstance force
;; change window focus
!k::!Esc
!j::!+Esc
;; switch between multiple desktops
!h::
Send {LCtrl down}{LWin down}{Left down}{Left up}{LWin up}{LCtrl up}
return
!l::
Send {LCtrl down}{LWin down}{Right down}{Right up}{LWin up}{LCtrl up}
return
!Left::
Send {LCtrl down}{LWin down}{Left down}{Left up}{LWin up}{LCtrl up}
return
!Right::
Send {LCtrl down}{LWin down}{Right down}{Right up}{LWin up}{LCtrl up}
return
;; another way to open the start menu
!Space::
Send ^{Esc}
return
;; kill window
+!d::
Send !{F4}
return
;; maximize window
!f::
Send {LWin down}{Up down}{Up up}{LWin up}
return
;; start menu movements
#IfWinActive ahk_class Windows.UI.Core.CoreWindow
^j::
Send {Down}
return
^k::
Send {Up}
return
#IfWinActive
;; context menu movements
#IfWinActive ahk_class Progman
^j::
Send {Down}
return
^k::
Send {Up}
return
#IfWinActive
;; window tile view movements
#IfWinActive ahk_class MultitaskingViewFrame
^j::
Send {Down}
return
^k::
Send {Up}
return
^l::
Send {Right}
return
^h::
Send {Left}
return
#IfWinActive
;; launch cmd
!Enter::
Run C:\Windows\System32\cmd.exe /K "cd C:\Users\gazin\Programming & bash"
return
;; tile windows
#l::
Send {LWin down}{Right down}{Right up}{LWin up}
return
#h::
Send {LWin down}{Left down}{Left up}{LWin up}
return
;; sound vol
!Up::
Send {Volume_Up}
return
!Down::
Send {Volume_Down}
return
!m::
Send {Volume_Mute}
return