What can it do for me?
AHI allows you to react to keyboard and mouse events in much the same way as AHK does, only with multiple keyboards and/or mice.
It can work in two modes (Both work at the same time)
Context mode is the simplest - you wrap your normal hotkeys in an #if statement, and AHI turns them on when the specific keyboard you wish to react to is about to send an event, and off again afterwards.
Subscription mode is an alternative to AHK's normal hotkey system - you can get notification of the state of single keys (No multi-key bindings, you would have to handle that yourself), buttons etc, whilst optionally completely blocking Windows from seeing the event.
In Subscription mode, you can also subscribe to "Raw" mouse movement, as you would get from RawInput. Both "Relative" (Regular mouse) and "Aboslute" (Graphics Tablet / LightGun) mouse modes are supported.
In addition to both of the input modes, you can send input (button presses, mouse movement etc) from a specific device.
How does it work?
AHI is a wrapper for Francisco Lopez' Interception driver.
It is written in C# (All source is available on the GitHub page) and is packaged as a DLL
You load this DLL using Lexikos' CLR linrary, and it loads the main Interception DLL and handles interaction with it for you.
A handy AHK wrapper is provided to allow you to easily load the DLL.
All files except the Interception DLL are included, you just need to install the Interception driver and copy it's DLL into the folder you downloaded AHI into.
READ THE INSTRUCTIONS AND WARNINGS IN THE DOCUMENTATION!!
GitHub page (Documentation etc)
Download from here
AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Last edited by evilC on 02 May 2018, 04:23, edited 15 times in total.
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
Í love it, thanks for making It! makes my life by the pc alot more comfortable and easy
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
Trying it out ASAP, seems quite useful for my needs!
Thanks
Thanks
-
- Posts: 74
- Joined: 09 Apr 2017, 14:05
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
hi! does this work with mice?
at the moment I was trying with my keyboard, and I get "Interception Test failed"...
also I'm not sure if my keybosrd is "HID\VID_413C&PID_2003&REV_0301", so VID := 0x413C, PID := 0x2003?
thanks
at the moment I was trying with my keyboard, and I get "Interception Test failed"...
also I'm not sure if my keybosrd is "HID\VID_413C&PID_2003&REV_0301", so VID := 0x413C, PID := 0x2003?
thanks
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
Version 1.2 Released!
Context Mode and Subscription Mode can now be used together.
Added SendKeyEvent() method to send key events using Interception.
Added Combined Example.ahk featuring use of both modes at once, with SendKeyEvent
Context Mode and Subscription Mode can now be used together.
Added SendKeyEvent() method to send key events using Interception.
Added Combined Example.ahk featuring use of both modes at once, with SendKeyEvent
-
- Posts: 17
- Joined: 23 Feb 2018, 04:17
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
This is awesome!
I am definitely checking this out. Cheers to you brother!
I am definitely checking this out. Cheers to you brother!
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
Just curious can the Inception DLL see events from a pen used with a tablet
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
I think so yes, but for now AHI is keyboard only.
It's most likely possible though, interception sees absolutely everything coming from keyboard / mouse devices.
Are you talking axes or buttons?
I have some code for relative axis input, but not coded for absolute input axes yet, need to lay my hands on a device that reports like that.
It's most likely possible though, interception sees absolutely everything coming from keyboard / mouse devices.
Are you talking axes or buttons?
I have some code for relative axis input, but not coded for absolute input axes yet, need to lay my hands on a device that reports like that.
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
when Windows rolled out the fall creators update, they changed the way the pen works. it used to work like a mouse where you could click and drag to select items on the screen, now if you click and drag it scrolls the window instead which is very annoying and i was looking for a solution to change it back. i'll have to investigate further to see what i can come up with
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
Is this a Wacom tablet?
I need to get one of those to do some testing with.
I need to get one of those to do some testing with.
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
its a Lenovo Yoga, the pen seems to use the wacom drivers though.
From the quick tests i've done interception can see when the barrel buttons are pressed but doesn't seem to get anything when the pen itself taps on the screen
From the quick tests i've done interception can see when the barrel buttons are pressed but doesn't seem to get anything when the pen itself taps on the screen
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
By "quick tests with Interception", what do you mean? Using this library? Your own Interception code?
If the tablet is reporting in absolute mode, then a lot of Interception code would likely not recognize the information I think, because it is designed for relative mode (normal) mice.
Any code using AutoHotInterception would not be able to see ANY mouse buttons or movement yet, because it currently has no mouse support.
I do have some code for it, but it is not currently in AHI.
If the tablet is reporting in absolute mode, then a lot of Interception code would likely not recognize the information I think, because it is designed for relative mode (normal) mice.
Any code using AutoHotInterception would not be able to see ANY mouse buttons or movement yet, because it currently has no mouse support.
I do have some code for it, but it is not currently in AHI.
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
i was playing around with the code from this topic
https://autohotkey.com/boards/viewtopic.php?t=26306
https://autohotkey.com/boards/viewtopic.php?t=26306
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
@grimboto - I do seem to remember someone got light guns working using that interception library, but they may well have modified it to use absolute mode or something.
If you know any C#, I have some code you can play with that should be easier to work with than the AHK code in that thread - you get to use the debugger in Visual Studio (My code only hooks specific keyboards, not all, so you can use 2 keyboards to be able to use keyboard while debugging)
@everyone - Version 1.3 has been released!
I added support for right versions of modifier keys (ScanCodes >= 256)
If you know any C#, I have some code you can play with that should be easier to work with than the AHK code in that thread - you get to use the debugger in Visual Studio (My code only hooks specific keyboards, not all, so you can use 2 keyboards to be able to use keyboard while debugging)
@everyone - Version 1.3 has been released!
I added support for right versions of modifier keys (ScanCodes >= 256)
Re: AutoHotInterception - Per-keyboard hotkeys for AHK (Fire macros in response to key on a 2nd keyboard)
Version 1.4 released!
Added support for Mouse
Buttons work in Subscription and Context mode (No Wheel support yet)
Movement only works in Subscription mode
Relative (Normal) mouse movement only for now, plan to investigate Absolute as soon as I get a device
Added support for Mouse
Buttons work in Subscription and Context mode (No Wheel support yet)
Movement only works in Subscription mode
Relative (Normal) mouse movement only for now, plan to investigate Absolute as soon as I get a device
Re: AutoHotInterception - Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
thanks for the offer @evilC unfortunately i don't know any C#. I'm keen to try the version with the added mouse support but the AutoHotInterception.dll seems to be missing from the libary folder in the latest update.
-
- Posts: 74
- Joined: 09 Apr 2017, 14:05
Re: AutoHotInterception - Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Hi! with 1.4, I got the keyboard hook working, but I culdnt detect mice. In fact they dont list in the DeviceList msgbox.
I tested with both examples but no way... any advice with this?
I tested with both examples but no way... any advice with this?
Re: AutoHotInterception - Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
version 2.0 released.
This is a breaking change - old scripts will need to be updated, but it is a pretty minor change.
Lots of new toys added though - see the changelog on the releases page for more info.
This is a breaking change - old scripts will need to be updated, but it is a pretty minor change.
Lots of new toys added though - see the changelog on the releases page for more info.
Re: AutoHotInterception - Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
I installed interception driver as Admin. I copied interception.dll into the Lib directory and renamed it to AutoHotInterception.dll. Then i tried monitor.ahk.
I got "Interception Test failed".
May be i forgot something to do?
I found that this.Interception.OkCheck() is empty and therefore the program stopped (exitapp). I tried to start the GUI by commenting the exitapp but this results in an empty Gui.
AHK v1.1.28, Win10 1709, x64
I got "Interception Test failed".
May be i forgot something to do?
I found that this.Interception.OkCheck() is empty and therefore the program stopped (exitapp). I tried to start the GUI by commenting the exitapp but this results in an empty Gui.
AHK v1.1.28, Win10 1709, x64
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: ntepa and 58 guests