#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.
Last edited by pingveee on 24 Mar 2019, 05:57, edited 2 times in total.
Even if i close my main script and create new empty one with this code, left windows key not work in shortcut, and start menu not appears.
Btw, right windows key + F1 will open the test message, left windows key + F1 will open help (default option as like if AHK just doesn't work).
#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.
$LWin::
return
#F1:: ; Win key + F1
MsgBox, a test
return
Anyway, my Main Script (windows key disable section is commented).
#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.
; ////////// Set Lock keys permanently //////////
SetNumlockState, AlwaysOn
;SetCapsLockState, AlwaysOff
SetScrollLockState, AlwaysOff
return
; # = Windows Logo Key
; ^ = CTRL Key
; ! = ALT Key
; + = Shift Key
; < > = Used before one of the above to define left side key or right side key on the keyboard
; ////////// Suspend AutoHotKey (OFF SCRIPTS) //////////
#ScrollLock::Suspend ; Win + scrollLock
return
; ////////// WIN BUTTON //////////
; LWin::Alt
; Disable Left Windows Key
; LWin::Return
; ~LWin Up:: return
; ////////// VOLUME CONTROL //////////
#WheelDown::Volume_Down
#WheelUp::Volume_Up
#PgDn::Volume_Down
#PgUp::Volume_Up
; ////////// MEDIA CONTROL //////////
$#Numpad6::Media_Next
$#Numpad4::Media_Prev
$#Numpad5::Media_Play_Pause
^Numpad6::Media_Next
^Numpad4::Media_Prev
^Numpad5::Media_Play_Pause
; ////////// APPLICATIONS //////////
#F1::Run chrome.exe
#F2::Run chrome.exe -incognito
#F5::Launch_Media
#F6::Run, mmsys.cpl ;
#\::Run calc.exe
$+#Del::FileRecycleEmpty ; Win+Del to empty trash (recycle bin)
; ////////// ALT + F6 TOGGLE AUDIO DEVICE //////////
!F6::
toggle:=!toggle ;toggles up and down states.
Run, mmsys.cpl
WinWait,Звук ; Change "Sound" to the name of the window in your local language
if toggle
ControlSend,SysListView321,{Down 1} ; This number selects the matching audio device in the list, change it accordingly
Else
ControlSend,SysListView321,{Down 2} ; This number selects the matching audio device in the list, change it accordingly
ControlClick,Button2 ; Change "&Set Default" to the name of the button in your local language
ControlClick,Button4
return
; ////////// Win+F12 - Sleep Win+F11 Shutdown //////////
#F12::
; Sleep/Suspend:
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
; Hibernate:
;DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
Return
+#F11::
Shutdown, 1
return
; ////////// DOTA 2 REMAP //////////
#IfWinActive ahk_exe dota2.exe
; Capslock::Alt
LWin::Alt
return
I thought it might be a problem due to i'm usind display fusion (for multiple monitors), which has its own key shortcuts, but even if i disable it windows panel still appears.
Yep, with this method windows start panel doesn't appears and WIN+F1 opens the messagebox (even with LWin key).
Maybe i should rewrite the script with "&" symbol, because "#" for windows button shortcuts doesn't work properly.