Close

AutoHotKey HID to the rescue

A project log for Thomson Reuters keypad

How to make use of it under Windows

Maciej WitkowiakMaciej Witkowiak 05/21/2021 at 11:040 Comments

I knew that raw HID events from this keypad are reported under Linux, I need to have something equivalent for Windows.

Fortunately, there is a library for AutoHotKey called AHKHID that enables this.

You need to put AHKHID.ahk script somewhere where AutoHotKey can find it, for example in c:\Users\%USERNAME%\Documents\Autohotkey\Lib\AHKHID.ahk

By following the tutorial from the first post under this forum post link I was able to identify HID device with example1.ahk script:

vendor: 5950
product: 70
version: 17

Then, with example2.ahk script with its GUI all the remaining parts:

usage page: 65280
usage: 165

and the message format.

Every message has 9 bytes. We are interested only in the first five bytes.

00 02 00 XX - press XX key
00 03 00 F0 XX - release XX

 The keymap is as follows (HEX keycodes):

02    YOURS
03    F7 / Macro1
04    F8 / Macro2
05    F9 / Macro3
07    MINE
09    BID
0A    F10 / Macro4
0B    F11 / Macro5
0C    F12 / Macro6
0F    OFFER
10    CONTACT
11    End Contact
12    Reset
13    Confirm
15    ACCEPT
16    [up]
17    [down]
18    7
19    8
1A    9
1B    [tab-left]
1C    [tab-right]
1D    Conv Up
1E    Conv Down
1F    4
20    5
21    6
22    Deal
23    Transfer
25    INTERRUPT
26    1
27    2
28    3
29    Quit
2A    Cancel Inst.
2D    0
2E    . (dot)
2F    Back Space
2C    CANCEL ALL
31    TRANSMIT

Some codes are missing. This is probably because of the fact that there are two switches under every wide key. 

Discussions