Redirect usb keypad to comm port

Hi I am trying to write a bit of VB to act as a keyboard wedge but I don't have a rs232 keypad to hand. Someone has said they have heard of redirecting a standard usb keyboard to a comm port. Just wondering how as Google isn't giving up the goods! If it helps as a workaround my VB machine is actually a virtual win7 32bit in be workstation.







Your question is not clear to me.
The title suggests you want to redirect output from a USB keypad to a comm port.
Your question suggests you want to use a RS232 KB (which you don'y have yet) so I assume you want to direct the output from the RS232 KB (i.e. comm port) to somewhere.
Can you please provide more detail about what it is you are wanting to do?



Sorry for the confusion. I am writing code for an rs232 keypad but I don't have one. My plan was to use a standard usb keypad and make it look like an rs232 keypad so I can test my code. All I then have to do when I get on site is stuff specific to their keypad (which key does what for instance).



You really need an RS-232 keyboard if you want to write code for it. Unless you have a driver for the serial keyboard then you will need to read the comm port directly. As far as I am aware it is not possible to emulate this with a USB keyboard.



you can use this sample as a starting point. What you will want to change is to add a
getkey routine and then send that key to the serial port
https://code.msdn.microsoft.com/windowsapps/SerialPort-Sample-in-VBNET-fb040fb2

Share this

Related Posts

There was an error in this gadget