The new InputHook looks very interessting.
For me it would solve a lot of problems if I could distinguish between different keyboards.
So the hook should have the option to only react on keys pressed on a specific keyboard or
also good would be if the hook would return me some information on which keyboard the
hook was pressed.
In my case, I need it to have different hotkeys on my notebook and on my external keyboard.
E.g. on my external keyboard, I use right Ctrl very often, on my notebook not so I have remapped it
to the context menu key.
Currently I need to disable this hotkey when I plugin my notebook into my docking station.
InputHook small improvement - different keyboards
-
- Posts: 10
- Joined: 14 Jan 2016, 10:31
Re: InputHook small improvement - different keyboards
Low level keyboard hooks can detect and intercept/block input, but cannot differentiate between keyboards.
Raw Input can differentiate between keyboards, but cannot intercept/block input.
Keyboard filter drivers can do all of this and more, but cannot reside within a user mode program.
AutoHotkey uses only a low level keyboard hook. InputHook is built around its capabilities.
In short, what you ask is possible in general, but is unlikely to ever become part of AutoHotkey itself.
Raw Input can differentiate between keyboards, but cannot intercept/block input.
Keyboard filter drivers can do all of this and more, but cannot reside within a user mode program.
AutoHotkey uses only a low level keyboard hook. InputHook is built around its capabilities.
In short, what you ask is possible in general, but is unlikely to ever become part of AutoHotkey itself.
-
- Posts: 10
- Joined: 14 Jan 2016, 10:31
Re: InputHook small improvement - different keyboards
What a pitty. With a function I could query to get the keyboard used for the keypress, there would be a lot of possibilities.
Thanks for your answer.
Thanks for your answer.
Re: InputHook small improvement - different keyboards
@0xDEADC0DE perhaps:
1. AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK.
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=45307
2. AHKHID
https://autohotkey.com/board/topic/38015-ahkhid-an-ahk-implementation-of-the-hid-functions/
3. HIDMacros (using external program)
https://autohotkey.com/board/topic/55921-multiple-keyboards-workaround/
HIDMacros is no longer developed, but there is a successor by the same dev. luamacros
https://github.com/me2d13/luamacros
which seems to work with AHK as well https://github.com/resir014/ahk-luamacros-test
1. AutoHotInterception (AHI): Multi-Keyboard / Multi-Mouse support for AHK.
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=45307
2. AHKHID
https://autohotkey.com/board/topic/38015-ahkhid-an-ahk-implementation-of-the-hid-functions/
3. HIDMacros (using external program)
https://autohotkey.com/board/topic/55921-multiple-keyboards-workaround/
HIDMacros is no longer developed, but there is a successor by the same dev. luamacros
https://github.com/me2d13/luamacros
which seems to work with AHK as well https://github.com/resir014/ahk-luamacros-test
-
- Posts: 10
- Joined: 14 Jan 2016, 10:31
Re: InputHook small improvement - different keyboards
Thanks for the links.
It's a bit much to do for what I want to do.
It's a bit much to do for what I want to do.
Re: InputHook small improvement - different keyboards
AHKHID and HIDMacros can differentiate keyboards, but cannot block
I forget if I added the functionality to AutoHotInterception to notify on all keys, but could add it if not - under the hood you subscribe to a whole device anyway, so it would be fairly simple to just add a flag to fire the callback for all keys
I forget if I added the functionality to AutoHotInterception to notify on all keys, but could add it if not - under the hood you subscribe to a whole device anyway, so it would be fairly simple to just add a flag to fire the callback for all keys
Re: InputHook small improvement - different keyboards
AHI 0.5.0 now has a function to subscribe to all keys on a specific keyboard
Who is online
Users browsing this forum: No registered users and 13 guests