Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers

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
add comment

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
add comment

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 (computer-engineering.org/ps2keyboard/scancodes2.html), 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.