Page 1 of 1

Keyboard Hook

Posted: Wed Mar 23, 2016 3:03 pm
by swhite
Hi

I am looking for suggestions to a problem of capturing keyboard data via a service. We have fuel sites that require alpha numeric input at the pumps. The driver might have to enter Driver's License number or vehicle number etc. However, all over the equipment is PCI certified so you cannot interface with it directly however we can use TCP/IP to send keyboard or FOB data to it. The keyboard that meets all of the mechanical and temperature requirements is a USB keyboard. We would like to capture that keyboard data via a service so that no application has to be running and then send the keyboard data over TCP/IP to the Fuel Site Controller. Does anyone know if you can capture this type of data with some kind of Keyboard hook? Could such a hook be written in Purebasic for Linux? I am just looking for ideas of where to find the information about how this might be accomplished.

Thanks
Simon

Re: Keyboard Hook

Posted: Wed Mar 23, 2016 3:19 pm
by infratec
Hi,

on linux it is not a big problem:

https://wiki.wireshark.org/CaptureSetup/USB

simply load the module, then your program can listen to all usb traffic.
Now you have to find the correct stream and filter out the data.

Bernd

Re: Keyboard Hook

Posted: Thu Mar 24, 2016 1:50 am
by swhite
Thank-you. I will take a look at the link you provided.

Simon