Because you are using an AHK hotkey to detect the keystroke, but Interception to send the output. AHK will see keys sent by interception.
Use Interception to detect the keystroke (Use SUBSCRIPTION MODE) and it won't self trigger, because Interception does not see the input it sends
AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
v0.4.2 has been released
https://github.com/evilC/AutoHotInterception/releases/tag/v0.4.2
This fixes a major bug with mouse button support
There is slightly more processing going on for mouse buttons - please let me know if you see degradation in performance / responsiveness
https://github.com/evilC/AutoHotInterception/releases/tag/v0.4.2
This fixes a major bug with mouse button support
There is slightly more processing going on for mouse buttons - please let me know if you see degradation in performance / responsiveness
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Is there a way I can make the script execute only once regardless of how long I hold down the "a" key? When I press and release "a" I get the output of josh once, but when I hold down "a" josh is spammed very fast. I would like it to run only once per press regarless of how long I hold down the key. Thanks
Code Text:
Code Text:
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Code: Select all
KeyEvent(state){
global AHI, keyboardId
static cs
if (!state){
cs := 0
return
}
if (cs)
return
cs := state
AHI.SendKeyEvent(keyboardId, GetKeySC("j"), 1)
AHI.SendKeyEvent(keyboardId, GetKeySC("j"), 0)
AHI.SendKeyEvent(keyboardId, GetKeySC("o"), 1)
AHI.SendKeyEvent(keyboardId, GetKeySC("o"), 0)
AHI.SendKeyEvent(keyboardId, GetKeySC("s"), 1)
AHI.SendKeyEvent(keyboardId, GetKeySC("s"), 0)
AHI.SendKeyEvent(keyboardId, GetKeySC("h"), 1)
AHI.SendKeyEvent(keyboardId, GetKeySC("h"), 0)
}
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Thanks for the solution, works great. Is there a way I could implement an on/off toggle to have a key to activate/deactivate the script when pressed?
Edit: Saw your response, thanks it works great
Edit: Saw your response, thanks it works great
Last edited by k1ngjosh on 19 Jul 2019, 20:10, edited 2 times in total.
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
v0.4.4 has been released!
Please note that this also contains changes from the v0.4.3 release, which was not announced on this thread as it was experimental.
@k1ngjosh - this release includes a new SetStatus function that you can call to turn on / off subscriptions.
Example usage (The F12 hotkey turns on / off subscriptions - note that it starts ON, so the first time it is called, you should pass false to turn it off)
Please note that this also contains changes from the v0.4.3 release, which was not announced on this thread as it was experimental.
@k1ngjosh - this release includes a new SetStatus function that you can call to turn on / off subscriptions.
Example usage (The F12 hotkey turns on / off subscriptions - note that it starts ON, so the first time it is called, you should pass false to turn it off)
Code: Select all
#include Lib\AutoHotInterception.ahk
AHI := new AutoHotInterception()
keyboardId := AHI.GetKeyboardId(0x04F2, 0x0112)
AHI.SubscribeKey(keyboardId, GetKeySC("1"), true, Func("KeyEvent"))
toggle := true
return
KeyEvent(state){
ToolTip % "State: " state
}
F12::
toggle := !toggle
AHI.SetState(toggle)
return
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
AHI 0.4.5 has been released
### Added
- Added TabletButtons demo for converting a graphics tablet into a button box
### Fixed
- Absolute Mode mouse movement subscriptions now work again
### Added
- Added TabletButtons demo for converting a graphics tablet into a button box
### Fixed
- Absolute Mode mouse movement subscriptions now work again
-
- Posts: 2
- Joined: 01 Aug 2019, 17:49
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Is this the application that Taran (of second keyboard fame) indicated has a price tag of about $2200 if support for more than 10 devices is required?
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
That's the Interception driver, which this library uses
We tried to pay the money to get that upgraded version, but he would not sell for a one off fee - instead he set up a patreon account and asked for a monthly income and would release it after 6 months or so.
You can see the conversation here: https://github.com/oblitum/Interception/issues/25
We tried to pay the money to get that upgraded version, but he would not sell for a one off fee - instead he set up a patreon account and asked for a monthly income and would release it after 6 months or so.
You can see the conversation here: https://github.com/oblitum/Interception/issues/25
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
v0.4.6 has been released!
- Added MoveCursor method to move the cursor to a specific position
This is similar to the AHK MouseMove command
- NumLock is now bindable
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
First of all, thank you for building this. I can't wait to get it working.
Downloaded and extracted files, copied Library files to lib, unblocked .dlls, installed driver (I think), restarted pc, removed and reinserted device, and . . .Motitor.ahk is still just a blank GUI.
What am I missing here? Did I skip a step?
Thanks for your help.
Downloaded and extracted files, copied Library files to lib, unblocked .dlls, installed driver (I think), restarted pc, removed and reinserted device, and . . .Motitor.ahk is still just a blank GUI.
What am I missing here? Did I skip a step?
Thanks for your help.
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
It should be very obvious if you did it right, you will get a response back from the command-line saying that install was successful.installed driver (I think)
Did you maybe just double-click the EXE instead of running it from a command-line?
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
@evilC
i can't get devices from GetDeviceList()
Array length = 0
I test it in monitor script, and monitor script can't give me my devices list. Why?
I install Interception from command line (in administrator)
i can't get devices from GetDeviceList()
Array length = 0
I test it in monitor script, and monitor script can't give me my devices list. Why?
I install Interception from command line (in administrator)
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Did you unblock the DLLs?
What version of AHK are you using? If 64-bit, try 32-bit unicode
What version of AHK are you using? If 64-bit, try 32-bit unicode
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Hi, thanks for lib. I have problems running some of the examples:
id1 := AHI.GetKeyboardId(0x04F2, 0x0112, 1)
to
id1 := AHI.GetKeyboardIdFromHandle("ACPI\VEN_PNP&DEV_0303")
Although I got it working by modifying the GetKeyboardIdFromHandle method in AutoHotInterception.ahk:
All I did is I replaced---------------------------
Context Example.ahk
---------------------------
Error in #include file "G:\Download\AutoHotInterception\Lib\AutoHotInterception.ahk":
0x80020006 - Unknown name.
Specifically: GetDeviceIdFromHandle
Line#
108: {
109: MsgBox,"Could not get " devType[isMouse] " with VID " VID ", PID " PID ", Instance " instance
110: ExitApp
111: }
112: Return,dev
113: }
115: {
---> 117: dev := this.Instance.GetDeviceIdFromHandle(IsMouse, handle, instance)
118: if (dev == 0)
118: {
119: MsgBox,"Could not get " devType[isMouse] " with Handle " handle ", Instance " instance
120: ExitApp
121: }
122: Return,dev
123: }
Continue running the script?
id1 := AHI.GetKeyboardId(0x04F2, 0x0112, 1)
to
id1 := AHI.GetKeyboardIdFromHandle("ACPI\VEN_PNP&DEV_0303")
Although I got it working by modifying the GetKeyboardIdFromHandle method in AutoHotInterception.ahk:
Code: Select all
GetKeyboardIdFromHandle(handle, instance := 1) {
; return this.GetDeviceIdFromHandle(false, handle, instance)
return this.Instance.GetKeyboardIdFromHandle(handle, instance)
}
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Ohh, I think I maybe see the issue - it's passing true/false, but the GetDeviceIdFromHandle method uses a lookup table with 1/0 for keys.
I am not sure what I was smoking when I wrote that
Does this also fix it?
[code]
GetKeyboardIdFromHandle(handle, instance := 1) {
return this.GetDeviceIdFromHandle(0, handle, instance)
}
[/code]
Edit, actually, no, doesn't look like it would, that lookup table is only for the error message
I think it is maybe related to how AHK C# interop works with booleans?
Ohh, I see the issue, I moved that method to a helper class in the C#
I am not sure what I was smoking when I wrote that
[code]
GetKeyboardIdFromHandle(handle, instance := 1) {
return this.GetDeviceIdFromHandle(0, handle, instance)
}
[/code]
Edit, actually, no, doesn't look like it would, that lookup table is only for the error message
I think it is maybe related to how AHK C# interop works with booleans?
Ohh, I see the issue, I moved that method to a helper class in the C#
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
v0.4.8 of AHI has been released!
https://github.com/evilC/AutoHotInterception/releases/tag/v0.4.8
Fixed the bug @tmplinshi just reported
Updated the Monitor app - there are now Copy buttons to copy the VID/PID of your device to the clipboard
[Edit] I forgot to prefix the VID/PID with 0x, so I deleted release 0.4.7 and re-released as 0.4.8
https://github.com/evilC/AutoHotInterception/releases/tag/v0.4.8
Fixed the bug @tmplinshi just reported
Updated the Monitor app - there are now Copy buttons to copy the VID/PID of your device to the clipboard
[Edit] I forgot to prefix the VID/PID with 0x, so I deleted release 0.4.7 and re-released as 0.4.8
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Thanks for the update! It works now.
Just a small bug of the Copy buttons, it copies wrong result, the & character becomes &&.
For example I got ACPI\VEN_PNP&&DEV_0303 instead of ACPI\VEN_PNP&DEV_0303.
Just a small bug of the Copy buttons, it copies wrong result, the & character becomes &&.
For example I got ACPI\VEN_PNP&&DEV_0303 instead of ACPI\VEN_PNP&DEV_0303.
Re: AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK. Per-device blocking!
Thanks for the heads up!
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 240 guests