AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

Post your working scripts, libraries and tools
phasermaniac
Posts: 74
Joined: 09 Apr 2017, 14:05

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

10 Apr 2020, 15:06

Mmm, I updated but same problem.
I noticed that the Sourcecode.zip has the files updated to 10/4/2020, while AutoHotInterception.zip files seems older. So I updated AutoHotInterception.ahk, CLR.ahk and Unblocker.ps1 from Sourcecode.zip, is this right?

Many thanks anyway for your help!
tzink
Posts: 1
Joined: 11 Apr 2020, 17:09

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

11 Apr 2020, 17:23

I used this script without difficulty in the past. Thank you for this great work. However, after a reformat, I am having difficulty.

Specifically, I can't determine the VID/PID of my USB keyboard because of an error with Monitor.ahk

When I run Monitor.ahk and check any of the ID boxes, I get the following error:
Error in #include file
"C:\Users\asdf\OneDrive\Documents\AHK\Lib\AutoHotInterception.ahk":
0x80020006 - Unknown name.

Specifically: SubscribeKeyboard
...
Continue running the script?
Even if I press Yes continue, none of the IDs register any input from my keyboard.

Any advice?

Thanks!
ppapkor
Posts: 9
Joined: 30 Jan 2019, 03:22

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

17 Apr 2020, 01:04

hi im using this wonderful code over a year
Thanks a lot. you are my hero at all.

recently i'm stucking at "synthesize keep pressing key" problem.

For example if i press 'a' key on the notepad and keep pressing it,
the result will be 'a(little break)aaaaaaaaaaaaa'.

But when i synthesize key down with this code,
it ends with only single 'a'.

I know this could be done with multiple key down line but what I want to do is hold pressing down a key + move on to the next line.

keydown
(
running code area, while key is keep pressed(a aaaaaaaa...)
)
releasekey

Could it be possible?
nichatr
Posts: 7
Joined: 17 May 2019, 01:43
GitHub: nichatr

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

21 Apr 2020, 12:46

Hello evilC, thank you for the great library!

I've encountered a problem: when I use the autohotkeyinterception in a separate script which I load at the start from my main context menu script, it seems that the second keyboard is not recognized.
So I put the <Context Example.ahk> code inside my main script. It works correctly when the two keyboards are connected, but when the second keyboard is not connected the following statement

Code: Select all

id2 := AHI2.GetKeyboardId(0x258A, 0x1006, 1)
causes an "ExitApp" so no script is loaded.

I've checked the source code and found the problem is in function GetDeviceId()

Code: Select all

	GetDeviceId(IsMouse, VID, PID, instance := 1) {
		static devType := {0: "Keyboard", 1: "Mouse"}
		dev := this.Instance.GetDeviceId(IsMouse, VID, PID, instance)
		if (dev == 0) {
			MsgBox % "Could not get " devType[isMouse] " with VID " VID ", PID " PID ", Instance " instance
			ExitApp
		}
		return dev
	}
distante
Posts: 1
Joined: 31 May 2020, 07:47

Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!

31 May 2020, 07:55

Hi, this is my first post so please bare with me.

I have a mouse that I move between 2 devices. An I am wondering which is the best way to not loose the current mapping when the id is missing (I mean besides restarting the script).

Thank you and thanks for this wonderful tool!

Return to “Scripts and Functions”

Who is online

Users browsing this forum: fhill2 and 17 guests