Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Most operating systems (if not all) asks about the keyboard layout during installation. Why do they need to know the layout? I mean, when pressing key, does the keyboard send a specific signal indicating what it represents (if so, why needing to specify the layout?) or it sends a signal indicating its position (the second raw, third key) and then the OS detects what key is that from the layout specified?

share|improve this question
up vote 4 down vote accepted

keyboards "send" numeric scancodes.

The operating system has to convert the scancode into an action or a displayable character.

For example, Shift+3 is the same scancodes on UK and US keyboards but needs to result in differing characters.

share|improve this answer

The latter. Each key on a keyboard simply sends a number back to the system, which the OS then interprets into a given key using Keyboard sets.

For example, if i hit a given key it could send "26" to the operating system. the OS then would look up what "26" means in the US keyboard layout and comes back with "3" which it then sends to the given text field.

share|improve this answer
Scancodes are standard (, however scancode combinations are not... – haimg Oct 10 '12 at 16:34
Corrected with right scancode. thanks. – Jared Tritsch Oct 10 '12 at 16:41

As mentioned by the others, the keyboards just send scans codes and it's up to the OS to determine what they mean. Realize also that not every keyboard layout has readily available proprietary hardware, so many people end up using a physical keyboard that is close to their locale but then remap the keys to their specific layout.

For example, I type on the US-Dvorak layout. Hardwired Dvorak keyboards are rare and very expensive, so when I install Windows I just switch it to the US-Dvorak layout and then rearrange my keycaps or add stickers (or just touch type).

share|improve this answer
Yeah, I use stickers a lot too – amyassin Oct 15 '12 at 13:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .