Pressing a key on computer keyboard

In summary: Thanks for your question. I'll try to explain it as simply as possible.Keyboards are scanned in row+column fashion, and the scanning circuit has a "dictionary" (ROM) copy of what each row+column combination should map into, character code wise. When a key is pressed, the scanning circuit energizes column 1, and looks to see if that energization shows up on any of the rows (holding down a key connects the column drive to the appropriate row sense circuit). Columns are energized in a rotating fashion, and the circuit keeps looking for energy coming back on the row sense lines to indicate a key (connection) being held down.That's way over-simplified
  • #1
jackson6612
334
1
Suppose "0" and "1" digits of binary in computers stand for 0v and 5v respectively. Further suppose "A" on the keyboard is the result of this combination "1101". Let's say there are four open switches lying down under the "A" key. When the key is pressed one of the four switches produced 0v and all others 5v in a proper sequence. That sequence of voltages - 5v,5v,0v,5v - flows to the RAM, where it gets recorded temporarily. Then, the CPU notices the presence of the sequence of voltages there and so on.

Am I on the track? Please let me know, and please remember I'm a layman as I'm sure you have figured out yourself. Thanks for your help and time.
 
Engineering news on Phys.org
  • #2
jackson6612 said:
Suppose "0" and "1" digits of binary in computers stand for 0v and 5v respectively. Further suppose "A" on the keyboard is the result of this combination "1101". Let's say there are four open switches lying down under the "A" key. When the key is pressed one of the four switches produced 0v and all others 5v in a proper sequence. That sequence of voltages - 5v,5v,0v,5v - flows to the RAM, where it gets recorded temporarily. Then, the CPU notices the presence of the sequence of voltages there and so on.

Am I on the track? Please let me know, and please remember I'm a layman as I'm sure you have figured out yourself. Thanks for your help and time.

No. In simple terms, keyboards are scanned in row+column fashion, and the scanning circuit has a "dictionary" (ROM) copy of what each row+column combination should map into, character code wise.

So the scanning circuit energizes column 1, and looks to see if that energization shows up on any of the rows (holding down a key connects the column drive to the appropriate row sense circuit). Columns are energized in a rotating fashion, and the circuit keeps looking for energy coming back on the row sense lines to indicate a key (connection) being held down.

That's way over-simplified, but that's what you asked for.
 
  • #3
jackson6612,

berkman succinctly explained how a keyboard internally determines which key was pressed. Once the keyboard determines which key is being pressed, it determines if the <Shift> key is pressed. As berkman points out, the result is mapped to a particular ASCII code for that key. The basic ASCII characters range from 0h to FFh (0 - 255) and are then sent via RS232 protocols to the PC. In your specific example of "A", the ASCII character 41h (65 decimal) is sent, which would look like "0100 0001" in binary, and implies either the <Shift> key was depressed, or the <Caps Lock> was set.

From the PC's point-of-view, it does not care how the serial data is generated. When a serial character is received it is simply put into a FIFO buffer until the CPU requests it. For a detailed review of the serial protocol: http://www.computer-engineering.org/ps2protocol/

Fish
 
  • #4
Thanks a lot, Berke, Fun.

As I mentioned that I'm a layman, so I'm not much interested in exact details. I wanted to know if I have the general idea right even for a single key. I do appreciate your help but it's just that much of it just flies over the head. So, please let me know if I have the general idea correct? Thanks.
 
  • #5
jackson6612 said:
Thanks a lot, Berke, Fun.

As I mentioned that I'm a layman, so I'm not much interested in exact details. I wanted to know if I have the general idea right even for a single key. I do appreciate your help but it's just that much of it just flies over the head. So, please let me know if I have the general idea correct? Thanks.

read berkeman's reply again and you will get the idea :)
he layed it out about as simply as possible without getting too technical

Dave
 

1. How does pressing a key on a computer keyboard work?

When a key is pressed on a computer keyboard, it sends an electrical signal to the computer's processor. The processor then interprets this signal and translates it into a corresponding character or action on the screen.

2. Why do some keys on my computer keyboard feel different than others?

The keys on a computer keyboard may have different levels of resistance or "feel" due to the different types of switches they use. Some keys may have a tactile feedback or require more force to press, while others may be more sensitive and have a smoother feel.

3. What should I do if a key on my computer keyboard is not working?

If a key on your computer keyboard is not working, you can try cleaning the keyboard with compressed air or a damp cloth. If that does not work, you may need to replace the keyboard or contact a technician for further assistance.

4. Can I change the function of a key on my computer keyboard?

Yes, many keyboards allow for customizable key functions through software or keyboard shortcuts. However, some keys may have specific functions that cannot be changed.

5. How do I know which keys on my computer keyboard are shortcuts?

Shortcut keys on a computer keyboard are usually indicated by symbols or letters in a different color or font. You can also refer to the keyboard manual or do a quick internet search to find a list of common shortcut keys for your specific keyboard model.

Similar threads

Replies
4
Views
6K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
Replies
12
Views
12K
  • Introductory Physics Homework Help
Replies
3
Views
4K
Replies
152
Views
5K
  • Computing and Technology
Replies
2
Views
5K
  • Computing and Technology
Replies
11
Views
3K
  • General Discussion
Replies
3
Views
2K
  • STEM Academic Advising
Replies
2
Views
2K
Back
Top