KeyboardHook installing itself without apparent reason

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
pneumatic
Posts: 338
Joined: 05 Dec 2016, 01:51

KeyboardHook installing itself without apparent reason

26 Sep 2017, 01:12

The first instance of the below script has no keyboard hook, however any more instances have their keyboard hook installed.

Code: Select all

#SingleInstance Off
#Persistent
#NoEnv
SetBatchLines -1
DetectHiddenWindows On
KeyHistory
Return

^!Numpad1::
return
just me
Posts: 9451
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: KeyboardHook installing itself without apparent reason

26 Sep 2017, 08:42

I guess that AHK uses the hook because the hotkey has been registered already by the first instance.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: KeyboardHook installing itself without apparent reason

26 Nov 2017, 22:45

just me is correct; you can't register the same hotkey multiple times.

Even if the reason is not apparent, AutoHotkey using the keyboard hook to implement a hotkey is not a bug. If the system denies hotkey registration for any reason, or the hotkey is of a type which can't be registered, the hook is used. AutoHotkey inherently has no control over whether registration succeeds.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Joey5 and 218 guests