Comments (4)
So, I'm using your example №2 to get info for "Left Windows" button.
Rows 1 & 2 are from keyboard while rows 3 & 4 are from touchpad. You see, there is no difference, and I cannot get any specific info about devices. What modifications to example №2 should I make to get at least DeviceIDs? And how to filter them later using AHKHID?
from ahkhid.
So somehow I managed to get handle (?) of device. However I don't know how to filter input based on that handle (?) and how to make it permanent. I guess the numbers will change after reboot.
#NoEnv
#SingleInstance force
SendMode Input
SetWorkingDir %A_ScriptDir%
#Include AHKHID.ahk
AHKHID_UseConstants()
;Intercept WM_INPUT
OnMessage(0x00FF, "InputMsg")
AHKHID_AddRegister(1)
AHKHID_AddRegister(1, 6, 0)
AHKHID_Register()
iCount := AHKHID_GetRegisteredDevs(uDev)
msgbox, %iCount%
OnMessage(0x00FF, "InputMsg")
InputMsg(wParam, lParam) {
Local r, h
Critical ;Or otherwise you could get ERROR_INVALID_HANDLE
;Get device type
d_handle := AHKHID_GetInputInfo(lParam, II_DEVHANDLE)
btn_id := AHKHID_GetInputInfo(lParam, II_KBD_VKEY)
}
from ahkhid.
And the core problem is that setting AHKHID_AddRegister(1, 6, 0, RIDEV_INPUTSINK)
doesn't allow to grab input from any window, only when script is in foreground (despine RIDEV_INPUTSINK being set)
from ahkhid.
I have the same problem. I can't obtain which keyboard has send the key.
from ahkhid.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ahkhid.