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

Post your working scripts, libraries and tools for AHK v1.1 and older
Mrsuperx13
Posts: 1
Joined: 13 May 2022, 02:34

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

Post by Mrsuperx13 » 13 May 2022, 03:10

I can't seem to get the monitor application to recognize my StreamDeck, its working fine for other devices...
is there something I could be doing wrong or is there another way I can get the device ID for it?

bertox
Posts: 8
Joined: 15 Jun 2017, 13:24

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

Post by bertox » 17 May 2022, 19:47

Hi, please i need some help on this: trying to do a buttons remap with my second mouse (bluetooth) but i can't.
Monitor works as it should, shows the mouse perfect and capture all buttons from mouse.
But my own script don't work because it seems that can't handle different format for mouseId than the common one ("0x0000, 0x0000").

So, which id can i use on script for this mouse to work? Ive tried all combinations already (ie: 0x0458, 0x0139) but none did the job.

This is the id for the bluetooth mouse from Monitor test:

0x0000, 0x0000
HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&00020458_PID&0139&Col01

I'll leave a screenshot taken from Monitor too if i can..
BluetoothMouseMonitor.jpg
BluetoothMouseMonitor.jpg (105.28 KiB) Viewed 6264 times

By the way mouse is connected by third party bluetooth dongle, is not a wireless mouse with its own dongle. In fact ive tried one if those and worked ok. But sadly i need to work with this particular mouse, the bluetooth paired one. Its just.. different (long story).

Thanks!

bertox
Posts: 8
Joined: 15 Jun 2017, 13:24

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

Post by bertox » 18 May 2022, 09:43

Ok ive been trying some new aproach.

This is my original code for a normal non-bluetooth mouse which works perfect:

Code: Select all

mouseId := AHI.GetMouseId(0x0458, 0x00E3)
AHI.SubscribeMouseButton(mouseId, 1, true, Func("MouseButton"))
return
Now im trying another way for detecting the bluetooth mouse (given the device ID i put on my first post):

Code: Select all

mouseId := AHI.GetMouseIdFromHandle(00001124-0000-1000-8000-00805f9b34fb)
AHI.SubscribeMouseButton(mouseId, 1, true, Func("MouseButton"))
return
Wtv... still don't works. Please some help on this, i'm not a master on code, just doing mashups of the examples found and testing testing testing.. big Thanks!

-----
EDIT: done, solved. Thanks to evilC for his help. :thumbup: :dance:

Working code was this way:

Code: Select all

mouseId := AHI.GetMouseIdFromHandle("HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&00020458_PID&0139&Col01")
So, exactly as copied from Monitor AND between quotes.

Randy31416
Posts: 58
Joined: 15 Jan 2014, 19:09

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

Post by Randy31416 » 30 Jul 2022, 18:07

Way back on page 9 a problem with mice locking up was mentioned.
evilC wrote:
03 Jan 2019, 17:25
I will have to investigate the lockups on sleep issue, can't say that I have ever seen anything strange in that regard.
It is thought to be caused by repeated plugging of devices and a 10-device limit in the underlying interception dll.

I am using AutoHotInterception for a keyboard only, in subscribe-all mode, and it works very nicely. But when my computer awakes from sleep, the mouse is sometimes absolutely locked except of the middle button, and I have to restart to get it working again. This is roughly the same problem as was described on Page 9 (although I never subscribe to the mouse).

Was there ever a resolution, or successful workaround, for this?

tqphan
Posts: 34
Joined: 04 Mar 2019, 14:44

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

Post by tqphan » 04 Aug 2022, 14:52

Hey guys, is this the official source for Interception? https://github.com/oblitum/Interception

User avatar
gregster
Posts: 9224
Joined: 30 Sep 2013, 06:48

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

Post by gregster » 04 Aug 2022, 17:26

tqphan wrote:
04 Aug 2022, 14:52
Hey guys, is this the official source for Interception? https://github.com/oblitum/Interception
That might be the underlying project, but to use it with AHK, you should follow the link to evilC's AutoHotInterception (AHI) wrapper/project on the first post of this topic: viewtopic.php?f=6&t=45307#p204884
But yes, if you folllow the links there to the original Interception driver (which you'll need to use AHI), you'll get to http://www.oblita.com/interception, and from there to https://github.com/oblitum/Interception. So I'd suppose you are right. I am not involved in either project, though, and not aware of the details.

pleonasm
Posts: 4
Joined: 01 Aug 2022, 15:57

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

Post by pleonasm » 05 Aug 2022, 16:55

I want to make a homemade remote control for a computer with a volume control from a wireless mouse. With AutoHotkey, I managed to bind up the volume on the wheel of one of the two mice connected to the computer, they helped me do this. But the problem is that if Winamp is in the input focus, it somehow intercepts the mouse from AutoHotkey, and the wheel starts scrolling the playlist, for example. I was advised AutoHotInterception, but I couldn't figure it out on my own. Please help me to make non-interceptable volume control with the wheel of one of the two mice connected to the computer.


pleonasm
Posts: 4
Joined: 01 Aug 2022, 15:57

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

Post by pleonasm » 06 Aug 2022, 16:48

I looked at EitherMouse. This application does not have the functionality of reassigning the wheel function.

tbeaulieu
Posts: 1
Joined: 16 Sep 2022, 14:06

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

Post by tbeaulieu » 16 Sep 2022, 14:20

Hi! I'm struggling to get this working. The call to GetDeviceList() returns nothing. I've unblocked the DLLs and it does run. It just returns nothing. The monitor script comes up empty no keyboard, no mice and a tiny screen because of lack of content. The other examples fail with a MsgBox telling me the device wasn't found (keyboard). I've tried all AutoHotKey variants (32, 64, U). All with the same results. CMD prompts are open with Administrator privileges.

Windows 10 Pro. Lenovo laptop.

Any thoughts?

Thank you. Really hoping to get this working so I can program a numeric keypad for my CNC without impacting the main keyboard.

ddt442
Posts: 11
Joined: 04 Jan 2020, 15:02

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

Post by ddt442 » 21 Sep 2022, 00:11

@evilC
Hi, I'm running win 11, and the Monitor app is working.
螢幕擷取畫面 2022-09-21 130227.png
螢幕擷取畫面 2022-09-21 130227.png (55.86 KiB) Viewed 5165 times
But for some reason the mouse-related example file can't get coord, like this:
2022-09-21 (2).png
2022-09-21 (2).png (5.6 KiB) Viewed 5165 times
Mouse button detection is working, only croods have problem.
2022-09-21 (4).png
2022-09-21 (4).png (4.39 KiB) Viewed 5165 times
Could you give me some tips on how to fix this?
I'm sure I'm doing everything you wrote on gitub step by step.

Dragonflag
Posts: 2
Joined: 21 Sep 2022, 06:20

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

Post by Dragonflag » 21 Sep 2022, 06:26

This is an awesome program/feature, thank you to evilC.

However, I'm having trouble getting a bluetooth numpad recognized. I can't get the real VID and PID for the device. I guess for bluetooth those don't even really exist. I also don't know what I'm supposed to use as the handle if I try to use "GetKeyboardIdFromHandle". The full handle below doesn't work nor does the string between the {} signs.

Here's the device info from the bluetooth numpad:
VID / PID: 0x0000, 0x0000
Handle: HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&000205ac_PID&0220&Col01

Can anyone help with this?

LAPIII
Posts: 676
Joined: 01 Aug 2021, 06:01

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

Post by LAPIII » 21 Sep 2022, 09:41

@Dragonflag I'm trying to learn how to use AHI and going by this:

bertox wrote:
18 May 2022, 09:43

Now im trying another way for detecting the bluetooth mouse ...

Working code was this way:

Code: Select all

mouseId := AHI.GetMouseIdFromHandle("HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&00020458_PID&0139&Col01")

the code needed would be:

Code: Select all

mouseId := AHI.GetMouseIdFromHandle("HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&000205ac_PID&0220&Col01")

Please tell me how works out.

Dragonflag
Posts: 2
Joined: 21 Sep 2022, 06:20

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

Post by Dragonflag » 21 Sep 2022, 15:59

LAPIII wrote:
21 Sep 2022, 09:41
@Dragonflag I'm trying to learn how to use AHI and going by this:

bertox wrote:
18 May 2022, 09:43

Now im trying another way for detecting the bluetooth mouse ...

Working code was this way:

Code: Select all

mouseId := AHI.GetMouseIdFromHandle("HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&00020458_PID&0139&Col01")

the code needed would be:

Code: Select all

mouseId := AHI.GetMouseIdFromHandle("HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&000205ac_PID&0220&Col01")

Please tell me how works out.
Thank you so much. It worked. :)

I tried so many different variations but didn't realize I needed the quotation marks.

williams
Posts: 56
Joined: 01 Jan 2015, 08:40

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

Post by williams » 01 Jan 2023, 07:05

evilC wrote:
08 Oct 2019, 09:23
No, you would need to manually handle that yourself
Hello, could you give an example of creating a key combination using Subscription mode?
Thanks for your help

LAPIII
Posts: 676
Joined: 01 Aug 2021, 06:01

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

Post by LAPIII » 23 Jan 2023, 23:53

I want a little help getting set up with AutoHotInterception. I watched the video A Separate Keyboard For Automation. Versatile, Efficient, Convenient | AHK + AHI Tutorial
and got stuck here:

[youtube]https://youtu.be/gZxebHjsXyw?t=1019Will[/youtube]

I don't know what the difference between ID 1 and ID 2 is since there was keystroke feedback for both. I also want to know how I can actually add a device.

LAPIII
Posts: 676
Joined: 01 Aug 2021, 06:01

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

Post by LAPIII » 03 Feb 2023, 15:52

Bump



EDIT: is this compatible with version 2?

alzalia
Posts: 1
Joined: 12 Feb 2023, 05:01

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

Post by alzalia » 12 Feb 2023, 05:06

Hi,

I recently discovered AutoHotInterception, and it's like, amazing ! But, I was wondering if it would be possible, on a second keyboard, to still use shift/ctl/alt and those type of keys to change a bit what is executed ?

So, for example, when clicking a key, it lower the master volume. But by clicking ctrl+key, it will only lower the volume from brave.exe. I already found the function to lower the volume from a specific app, but not the one to use a combinaison of keys !

Thanks for your help, and sorry for my bad english :/

Jolly
Posts: 6
Joined: 20 Jul 2022, 16:05
Contact:

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

Post by Jolly » 20 Feb 2023, 13:11

Mrsuperx13 wrote:
13 May 2022, 03:10
I can't seem to get the monitor application to recognize my StreamDeck, its working fine for other devices...
is there something I could be doing wrong or is there another way I can get the device ID for it?
The streamdeck isnt a standard HID device.

ea5gtq
Posts: 4
Joined: 22 Feb 2023, 06:52

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

Post by ea5gtq » 22 Feb 2023, 12:05

Please help with a script for two keyboards.
Does anyone have a sample? The task seems to be simple. The same button should display different text on the screen.
The driver is installed. Monitor.ahk is working.

Post Reply

Return to “Scripts and Functions (v1)”