1
votes

How can I delete the assigned hotkey in autohotkey? I want to free the keyboard assignment completely so that the hotkeys will be available for other applications in windows. Example: in autohotkey I assign ctrl+L to a function at the start of the program but after 10 seconds I want to release and free those keyboard assignments so that the other application which will be running after 10 seconds will be able to use those hotkeys. Could someone please give an example script?

2

2 Answers

2
votes

How to delete an assigned hotkey in autohotkey?

By using the command made for exactly this:

hotkey, ^a, off
0
votes

Defines F1 behavior based on active window:

SetTitleMatchMode 2     ; Makes #If statements match anywhere in title

#IfWinActive Microsoft Word
  F1:: MsgBox F1 pressed in Word
#IfWinActive Notepad
  F1:: MsgBox F1 pressed in Notepad
#IfWinActive
  F1:: MsgBox F1 pressed elsewhere