• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

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.
0
simonwait
Asked:
simonwait
  • 4
  • 3
  • 2
  • +1
1 Solution
 
simonwaitAuthor Commented:
Sorry I meant VMWare workstation
0
 
akbCommented:
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?
0
 
simonwaitAuthor Commented:
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).
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
akbCommented:
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.
0
 
David Johnson, CD, MVPOwnerCommented:
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
0
 
viki2000Commented:
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.
0
 
simonwaitAuthor Commented:
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
0
 
akbCommented:
You can copy HyperTerminal from XP to Win 7 and it still works.
0
 
simonwaitAuthor Commented:
I actually only needed the com0com program.  The rest seems to work well bouncing between my 2 VB applications.  Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now