Solved

??Keyboard Question??

Posted on 1998-12-10
12
241 Views
Last Modified: 2010-04-27
Hello,
   I am designing a VB app to help handicapped people type and I have two questions related to keyboards and ports.  Anyway, here we go...
   First, I would like to connect a laptop, from it's serial, to the keyboard port of a host computer.  What type of cord, hardware would I need.  Second, what signals are used by a keyboard and are sent to the computer, i.e, hexidecimal values, ....  Is there a reference, on the web or a book, describing how to manipulate a keyboard with these signals.

Thanks in advance!
- Rob

P.S. - I know little about hardware. :-)
0
Comment
Question by:RobS
12 Comments
 

Author Comment

by:RobS
ID: 1130831
Edited text of question
0
 
LVL 9

Expert Comment

by:rmarotta
ID: 1130832
Rob,
What are you trying to do?
Why not go from serialport-to-serialport to allow the two computers to communicate?
There are standard cables and software available to enable this.
Regards,
Ralph
0
 

Author Comment

by:RobS
ID: 1130833
rmarotta,
  The program is complete and works perfectly from serial to serial.  The problem is the host PC needs a program, which I've also written in VB, to process the incoming data.  We would like the host computer to not require any addition software.  I can't think of a way to send data from serial to serial and control the keyboard that way.  If you can think of something, let me know.
0
 
LVL 5

Expert Comment

by:Jason_S
ID: 1130834
As I understand, you want connect directly from the Serial port on the laptop to the keyboard connector on the PC.  (Neat concept)  This would let you "virtualy" type anything into the PC by using a program sending the data out the serial on the Laptop.

I don't know if this link is any help to you, but its worth a try.
http://www.usar.com/prodnser/keycod.htm
0
 

Author Comment

by:RobS
ID: 1130835
Jason_S,
   That's exactly what I want to do.  I'm thinking if keyboards use hexidecimal values for keys and it should be the same with all keyboards and platforms, then the laptop will be able to connect to any computer (Macs, SUN, PCs...)
   I looked at the site you gave me.  Thank you, but I don't think it will help.  At least not yet ... I'll have to browse some more.

Thanks
0
 

Author Comment

by:RobS
ID: 1130836
Jason_S,
   That's exactly what I want to do.  I'm thinking if keyboards use hexidecimal values for keys and it should be the same with all keyboards and platforms, then the laptop will be able to connect to any computer (Macs, SUN, PCs...)
   I looked at the site you gave me.  Thank you, but I don't think it will help.  At least not yet ... I'll have to browse some more.

Thanks
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:RobS
ID: 1130837
Jason_S,
   That's exactly what I want to do.  I'm thinking if keyboards use hexidecimal values for keys and it should be the same with all keyboards and platforms, then the laptop will be able to connect to any computer (Macs, SUN, PCs...)
   I looked at the site you gave me.  Thank you, but I don't think it will help.  At least not yet ... I'll have to browse some more.

Thanks
0
 
LVL 3

Expert Comment

by:rosefire
ID: 1130838
Is your objective to be able to type on the laptop and have it appear as though you are typing on the other computer?  There may be a way to do this through DOS COM settings, but I am fuzzy on it.  If this is what you want to do, let me know and I'll look into it.
0
 

Author Comment

by:RobS
ID: 1130839
rosefire,
   I designed a program in Visual Basic and the form resembles a keyboard.  The user can click the button via the mouse/trackball or speak text in a microphone and I'll handle voice recognition.  The data will then be sent to the host computer.  The purpose it to mimic the keyboard without actually typing.
0
 
LVL 3

Expert Comment

by:rosefire
ID: 1130840
Ah, so what you want to do is have the PC act as a virtual keyboard for the host computer for a couple different input modes.  This is not a trivial problem.  Basically what you need to do is get a driver to sit on the host computer and interpret what comes in as keystrokes.  You also would need a program on the PC that would make the PC take its input from various sources and send it to a driver on the PC that would send it out to the host.  This is a significant undertaking.

You may be able to find some tools available if you search the internet.  Maybe someone or some company has already solve this problem.  You might even go ask at a handicapped-related chat or newsgroup.  The people who use stuff like this might be able to tell you more.

Sorry I don't have a pat answer.
0
 

Author Comment

by:RobS
ID: 1130841
rosefire,
   Thanks for your ideas.
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 100 total points
ID: 1130842
First off there are the electrical problems. A COM port runs on +-12VDC signals, a keyboard uses TTL (+5V) or lower (3.3V) levels so a striaght cable is *NOT* going to work without some support electronics.

Second is protocol. COM ports are driven by 8255 type UARTs (Universal Asynchronuous Receiver/Transmitters). These chips convert a byte of data from the computer into a serial data stream. Additionally they add/remove start/stop bits, generate and check parity bits and take care of the timing. The keyboard uses a direct serial data stream with a separate clocking signal. There is no parity, stop, start or inter character bits. Additionally the UART runs on a 16X clock at specific baud rates (300/600/1200/2400/4800/9600/18.2k etc) while the keyboard generates it's own timing signal. Thus the data protocols are wildly different.

The upshot of this is that there is no good way to tie a COM from one computer to the keyboard of another without a *LOT* of data. Additionally since the keyboard is unidirectional (IN only), there is no way for the two systems to know where they are in a transfer or to signal when to start, stop, resend, etc.

By not using a small TSR program, you're requiring a huge up front engineering effort to design a complex box that, in the end, will *still* not give you decent performance. If you bite the bullet and get a simple TSR program (or even simply use the MODE command to redirect STDIN and STDOUT to the COM port) then you get the ability to fully control the PC with a $5.00, fully passive, serial cable.

M

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now