What is a keyboard wedge?
WLKB232 is a 2.6' X 1.7' X 0.8' module This allows even small microcontroller systems to incorporate wireless keyboards without any of the development complexity of USB and HID drivers. RS232 key-cap characters are available from the wireless keyboard. Using a USB to RS232 converter: We tried to straight up connect the keyboard to the RS232 port using a cable converter. The cable was recognized, but the keyboard didn't get any power. We even tried to strip the keyboard wires and connect another USB port to it for power from the computer. That didn't work. Recently, we found the this product. This product claims to convert any old RS232 peripherals to USB.
In the days before USB, bar code readers often came with a hardware keyboard wedge, a little device which allowed both a keyboard and the barcode reader to be connected to the keyboard port (PS/2) of a PC. Codes scanned by the barcode reader could thereby be transmitted as keystrokes. As far as the computer was concerned, there was no difference between a key pressed on the keyboard and one sent by the barcode scanner. This allowed the barcode scanner to be used with any application that accepted keyboard inputs.
While hardware keyboard wedges have become rare (most barcode scanners today connect via USB and appear as a human interface device), this very flexible concept still exists in the form of a virtual keyboard wedge (a.k.a. software keyboard wedge, “RS-232 to keyboard”-software). These programs are usually used with devices that connect to a computer via RS-232 (COM port) or that emulate an RS-232 connection while actually connecting through USB, Bluetooth SPP (serial port profile) or any other kind of virtual COM port.
Such devices include measurement instruments like balances and scales, digital calipers, etc. and legacy devices like serial barcode scanners and card readers. The software keyboard wedge connects to these devices and types received data into any application as simulated keystrokes.
Keyboard wedge software for Windows
This list contains all keyboard wedge programs I know of in alphabetical order. Prices were last updated on June 1st, 2019. Please leave a comment if you know a program not listed here.
- 232key: Free (232key Plus with additional features: US$30). Easy to configure, extensive documentation available on website. Predefined settings for many balances and scales. Powerful custom regular expressions to capture exactly the data you want (Plus version only). Can be used concurrently with 232key MU (US$50) to connect to two serial devices. Disclosure: I made this.
- Bill Redirect: Commercial (US$35). Lots of tutorials available. Particularly interesting for touchscreens.
- Datasnip keyboard wedge: Free (AUD 10 for advanced options). Simple, straightforward user interface. Advanced options include hotkey to send command to connected device.
- ewCaptSer: Free. Only available in German. Minimal functionality.
- Kern Balance Connection 4: Commercial (starts at 150€ excl. VAT, includes device-specific RS-232 cable). Predefined settings for Kern balances and scales.
- KeyInjector: Commercial (four versions from US$24.95 to US$74.95).
- RsKey (Win CT): Free, only works with scales and balances using A&D’s data format.
- TWedge: Commercial (from 116 US$). Extensive functionality, can be adapted to almost any task through scripts (using JavaScript).
- WedgeLink: Commercial (89 US$ Lite, 195 US$ Standard), support up to two serial devices.
- WinWedge: Commercial (299 US$ Standard, 399 US$ Professional). See feature list comparison.
Which keyboard wedge software is the best?
Impossible to say, without knowing what you’re planning to do, looking at each program in detail and testing it to see if it works reliably.
Generally speaking (and keep in mind that I’m certainly biased here), 232key can do many things for free which would otherwise cost you money (sometimes a lot of money). It is certainly worth trying out, particularly if you want to transfer the weight from a scale or balance to your PC. Please note that 232key cannot (currently) request data from your device (by sending a device-specific command), so you’ll have to press a key on your device instead (like the “Print” key on a scale, though many scales can also be configured to send stable data automatically). Thanks to feedback from my users and customers, I’m constantly adding new useful features to 232key (see changelog).
TWedge is (in my experience with several demanding customers) an excellent choice if you need maximum flexibility or want to connect to multiple devices at the same time. There’s hardly anything it can’t do if you’re willing to modify the scripts that come with it. While some other programs look like they haven’t been updated in a while, TWedge is regularly improved. Its latest version can even intercept and modify data sent by USB human interface devices (HID) like modern barcode scanners.
Further information on RS-232 interfaces
Have a look at my curated page on Zeef which includes links to general information on RS-232, keyboard wedge software, terminal software and RS-232 analyzers.
Rs232 Keyboard Arduino
Here at ULPGC I'm following a Robotics course. In the practical part of the exam we have to write some applications to operating some didactics robots we have (Rhino XR-4 and SCARA Robots).
Each robot is connected to a Controller (Rhino Mark-4) which can be connected to a PC to send commands to the Controller in order to let the robots do things.
The PC to Controller connection is a serial RS-232 connection.
So.. for the practical parts of the exams we need to write applications which, using the RS-232 communication channels, controls the movements of the robots.
The professor here suggested to use Java to implement the applications: unfortunately I found the API comm pretty complex in installation and configuration.
So.. I looked for different solutions.
Surprisingly I found that Python with the pySerial module is a pretty intelligent solution!
I've been able to install and use them (in both Linux and Windows) without problems at all (while my classmates had lot of problems with java and comm apis...). Just follow any guide on the web to install Python on your system and then follow the pySerial installation guide.
Rs232 Keyboard Wedge
Using the pySerial apis is pretty simple: just have a look at the project website to have an idea of the apis it gives you.
A simple application
Rs232 Keyboard Cable
I give you here a simple application which should let you understand how python serial apis are easy to use. The application is a simple serial terminal which you can use to send commands (and receive output) to a serial connected device.
This is the application code:
NOTE for Python 3 users: The code above has been written for Python 2 and I'm no more able to test RS232 connections with Python 3. As some users commented below the raw_input() function has been removed so you should just use the new Python 3 function input(). If you use Python 3 and find other issues with the code please leave a comment. Thanks!
As you can see the code is pretty simple and self documenting. This should demonstrate you the power of this solution.
Really important is the serial port configuration: if you configure it incorrectly you probably will end in problems during communications (check the manual of the device you are connecting to get the correct connections parameters).
Also remember to point the port parameter to the device file you are using (under windows you can simply use COMMX, where X is the COMM instance number 1,2,3,4,etc. )
Conclusions
I consider Python and pySerial one of the simplest and faster ways to develop an application to use a serial connection.
You will also be able to use the huge amounts of other native apis and additional modules Python has to add all kind of features to you applications!
If you need a graphical interface I strongly encourage you to have a look at the pyGTK project and the Glade interface designer.