simonwait
asked on
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?
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?
ASKER
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
getkey routine and then send that key to the serial port
https://code.msdn.microsoft.com/windowsapps/SerialPort-Sample-in-VBNET-fb040fb2
I have another idea.
Why don't you use your no matter what keyboard type you have and input the text in a terminal like Hyper terminal or a similar one which is able to communicate serial.
Then use and additional software to make virtual serial ports and redirect the text to one of them which you may use in your VB code.
That's it.
If you cannot find on Google the software that I am speaking about, then I can help you.
Why don't you use your no matter what keyboard type you have and input the text in a terminal like Hyper terminal or a similar one which is able to communicate serial.
Then use and additional software to make virtual serial ports and redirect the text to one of them which you may use in your VB code.
That's it.
If you cannot find on Google the software that I am speaking about, then I can help you.
ASKER
Thanks David and Vikki Ive started to look at your suggestion David and will pop out to buy a null modem cable. Vikki Ive started doing some googling but Ive also only just realised Hyperterminal doesnt exist in Win7 anymore (I havent used it for years) Will get back to you both in a bit
Cheers
Cheers
You can copy HyperTerminal from XP to Win 7 and it still works.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I actually only needed the com0com program. The rest seems to work well bouncing between my 2 VB applications. Thanks
ASKER