jleb / ahkhid Goto Github PK
View Code? Open in Web Editor NEWAn AHK implementation of the HID functions
An AHK implementation of the HID functions
From what I can tell, it is meant to be possible to query device data (For joysticks at least) to obtain device capabilities (ie number of axes and buttons).
This is implemented via passing RIDI_PREPARSEDDATA to GetRawInputDeviceInfo.
Further calls to HID.dll are then made (eg HidP_GetCaps) to determine the capabilities of the device.
I am trying to work through adding this functionality, but it is not something I know much about. Any help appreciated.
Hello, Sir.
I have troubles with understanding the documentation, could you please point me to the right direction?
I have a "laptop" with keyboard and touchpad. Unfortunately, the touchpad is somehow "hacked" by chinese manufacturers, so it has smart gestures emulated. So whenever I swipe left on touchpad, it sends "Left Windows" button.
As far as I see, I can try filtering such buttons by getting DeviceID of keyboard & touchpad and simply ignoring "Left Windows" sends by touchpad.
GetDevInfo function requiers an index
. However is there any way to get device which send a specific button?
I understand a couple of others may have worked on this code in the AHK forums, but it would be nice if this library had a clear license or even some short verbal indication of the ability to re-use this code in other projects.
I have a project that could have benefited from this library, but I also want to ensure that I respect the wishes of the author(s). What I have is an open-sourced project, GPL v2 (although I am fine with other licenses such as MIT & even GPL v3, if asked), but may issue with including ambiguously licensed code comes down to distros and distribution.
My project spans across Windows and Linux. I guess if I were to use this code I could download it separately, if needed on Windows.
code in examples unreadable and full of magic. It is not clear, what it is doing.
For example:
;Anchor by Titan, adapted by TheGood
;http://www.autohotkey.com/forum/viewtopic.php?p=377395#377395
Anchor(i, a = "", r = false) {
static c, cs = 12, cx = 255, cl = 0, g, gs = 8, gl = 0, gpi, gw, gh, z = 0, k = 0xffff, ptr
May be add more of simpler exaples?
When i execute example_1.ahk
i always just get
---------------------------
example_1.ahk
---------------------------
Error: Call to nonexistent function.
Specifically: AHKHID_UseConstants()
Line#
020: Gui,Add,ListView,x16 y40 w440 h150 vlvwKeyb gLV_Event AltSubmit,Name|Type|SubType|Keyboard Mode|Number of Function Keys|Number of Indicators|Number of Keys Total
021: Gui,Tab,2
022: Gui,Add,ListView,x16 y40 w440 h150 vlvwMouse gLV_Event AltSubmit,Name|Mouse ID|Number of Buttons|Sample Rate
023: if bVista
024: LV_InsertCol(5, "", "Has Horizontal Wheel")
025: Gui,Tab,3
026: Gui,Add,ListView,x16 y40 w440 h150 vlvwOther gLV_Event,Name|Vendor ID|Product ID|Version Number|Usage Page|Usage
---> 029: AHKHID_UseConstants()
032: iCount := AHKHID_GetDevCount()
035: Loop,%iCount%
035: {
037: HID0 += 1
040: HID%HID0%_Handle := AHKHID_GetDevHandle(HID0)
041: HID%HID0%_Type := AHKHID_GetDevType(HID0)
042: HID%HID0%_Name := AHKHID_GetDevName(HID0)
The program will exit.
---------------------------
OK
---------------------------
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.