"keyboard wedge" software??

Jan 25, 2005 2 Replies

"Keyboard wedge" software monitors a serial port, and stuffs any incoming characters into the keyboard buffer.



The net result is that a piece of equipment such as a barcode scanner can be plugged into a serial port and whenever a barcode is scanned, the characters appear to whatever program is active exactly as though someone had simply typed them.



Keyboard wedge software, e.g. softcom, has been available on M$ systems for years, although now most of the barcode, check, mag stripe, and smartcard scanners are physical PS2 keyboard wedges.



We're seeing some new equipment coming out, with choice between serial port and USB port interfaces, and NO software of any sort for Linux.



We've been looking for a Linux serial port keyboard wedge program, but haven't found anything yet.



If you know of one, or know someone who might be interested in writing one, please respond.



If there's a better place to look, I'd appreciate hearing about it!



Thanks in advance - RP



No. A Keyboard Wedge is a device that you insert between the keyboard and your computer. That's why it's called a wedge.

Perhaps you should study the topic a little bit more before you post again.

Google for "keyboard.wedge scanner". The sixth article, titled "Which Bar Code Scanner is Best for Me" explains the technology.

CB

Stuff like that is easy under windows, because windows is basically a one seat kind of operating system. One person sits down and keystrokes get sent as messages to an awaiting text entry area. Linux is built as a multiuser operaing system from the start, so where the keystroke would be sent would be quite a problem if two people are logged in at one time, not generally a problem in the embedded realm where an operating system will pretty much run one application. To do what you want , I guess you would have to patch the kernel to such an extent as to have it open the serial port for input and transfer data passed in from it through to the "current console" the same way keystrokes from the keyboard would be routed. I don't know, but perhaps it is possible to open a connection to a "console tty" and write data to it. Linux somehow is able to route standard in and standard out to a serial console , when a true graphical screen isn't being used, so it stands to reason that someone could patch it in such a way to take standard input from a keyboard and a serial port simultaneously.

In the time it would take to look it up and program it you could just write a thread that opens the serial port and grabs the characters yourself and stuffs them were you will them.

As far as capturing USB data, it depends on how they map the USB inteface. They may simply map it into the serial port space, in which case, if a linux driver exists for that USB serial port interface , then you could open that virtual serial port and capture the characters as well.

I realize that doing it yourself is what you are trying to avoid here, but that may be your only option.

My two cents. Tony

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required