I recently needed to use this feature in order to get input from a Honeywell 4600GSR scanner, which is one of the few scanners around that can convert convert the 2D Australia Post 4-state barcodes into their constituent bits and pieces.
SerialKeys looked as if it could do the job, but unfortunately only works for COM1 through COM4, which was a pity, because the device driver for this thing registered it at what appeared to be an unmoveable COM15.
After mucking about with the registry for a bit, I ended up rewriting the SerialKeys functionality in a separate application, which, in order to prevent being sued to the ends of the accessible earth, I’ve called “Serial Input for Windows”.
And here it is:
To use it:
Open the application
Click ‘Enable Serial Input for Windows’
Select a COM port, baud rate and other COM settings
Click ‘Apply’ and acknowledge the ‘Serial Input for Windows is now listening on COMn’ dialog box.
Whilst this app is in the foreground, any input from the selected COM port is displayed in the application’s ‘Test input’ frame
If another app is in the foreground, any input from the selected COM port is forwarded to that application
It doesn’t implement the full SerialKeys API; in particular mouse control isn’t implemented at all
The virtual key mapping is fairly primitive; I just created enough of this to get my particular use-case done. So things like shift+character, ctrl+character etc… probably won’t work.
I haven’t tried it in any OS other than Windows XP, so don’t be surprised if Vista/7/Metro etc consider the whole program a security breach and prevent it from working anyway. Progress.
Because this is a .NET app, I haven’t gone through the whole maven build rigmarole (I did look at NPanday many moons ago, but there’s a bug in there that prevented me from using it). Although there’s a patch for it now, so maybe I’ll give it another shot.
Some links which were useful in the making of this thing: