Jump to content

How does the character map inside the keyboard's processor work?


seriously disabled

Recommended Posts

In Howstuffworks it's written that a keyboard is a lot like a miniature computer. It has its own processor and circuitry that carries information to and from that processor. A large part of this circuitry makes up the key matrix.

 

When the processor finds a circuit that is closed, by pressing the "a" key for example, it compares the location of that circuit on the key matrix to the character map in its read-only memory (ROM). Then, it sends the "a" key to the computer.

 

My question is: How does the character map inside the keyboard's processor work in detail? Could someone give us a detailed explanation on the character map inside the keyboard's processor?

Link to comment
Share on other sites

there isn't a character map. thats on the computer.

 

all that happens in the keyboard processor is that it picks up a key press and then sends out the corresponding binary code for that key.

 

this binary code gets interpreted by the computer which determines whether it becomes a b, shift, capslock or one of those little n's with a ~ on top.

 

it'll be the same code no matter what the current character map is. but the computer takes this code, compares it to what it THINKS the keyboard looks like and then displays what it thinks it is sending.

 

obviously it is advantageous to use a character map that truely represents your keyboard but it is not a necessity. i once remapped my keyboard to dvorak to try it out, if i took that keyboard to another computer it would work as normal.

 

there isn't much to it. a signal in gets translated to a signal out. it handles the key combos as well. you could do it without a processor too but you'd need some more wires.

Link to comment
Share on other sites

it'll be the same code no matter what the current character map is. but the computer takes this code, compares it to what it THINKS the keyboard looks like and then displays what it thinks it is sending.

 

That's what I was about to ask. How does the computer know how the keyboard looks like? It doesn't have eyes and vision so how exactly does it do that?

Link to comment
Share on other sites

its part of the operating system and its a standardised thing.

 

for example(these are not the real codes) if the a key is 01011101 then all keyboards will send 01011101 when it is pressed. the computer will have a character map that tells it that 01011101 is a.

 

however, if you replace the character map so that 01011101 is interpreted as b then the computer thinks that your a key is actualy a b.

 

it doesn't need to see it.

Link to comment
Share on other sites

As IA said, the keymap is handled by the operating system, not the keyboard. Your computer will assume the keyboard is configured for your current locale. Macs will actually prompt you and do some quick tests to determine the keymap (e.g. hit the key immediately to the right of your left shift key). Other OSes require you change the keymap manually. If you plug a keyboard for a different locale into your computer it will typically map incorrectly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.