Can my laptop use two keyboard layouts?

0

My laptop has an English keyboard, but I also plug an external full-size Spanish keyboard into it. To be honest I hate to switch the layout back and forth when I'm on the go (internal keyboard), or back at home (full-size keyboard).

So I have a few questions that hopefully someone can answer. I'm really confused about this simple issue:

  1. Is it possible for the laptop to discover the keyboard layout by itself during the OS installation? Why do I need to specifically tell the OS which keyboard layout the current keyboard has?

  2. Afterwards, is it possible for the laptop to discover both keyboards (internal & external), and understand they have different layouts, so when I press a dash sign (-) on any of them a dash will be typed, and no other character?

  3. What happens if I hot plug a new keyboard with a different layout (let's say French). Will the laptop discover it and also its layout? I would think that in this era of ultra-fast USB 3 it would be simple for the keyboard to tell the laptop about basic info, like its layout; a few extra bytes in the protocol should be enough, right? Or am I wrong?

  4. Is there a limitation on the OS that could prevent this? Maybe the OS has a single setting for the keyboard layout? This just occurred to me.

It's just I think by now (we are in 2018, aren't we?) there should be a better way of doing this. Thanks in advance for any insight.

The Impaler

Posted 2018-04-05T15:54:41.310

Reputation: 101

2There's really nothing different in the keyboard other than how the keys are labelled. French, English, Spanish, have the same hardware, it's how each key is mapped by the OS that makes them different, not the underlying hardware. You'd need extra hardware in the keyboard that could identify itself to the OS and the OS would need customization to recognize that the keyboard was not a standard USB keyboard. – essjae – 2018-04-05T15:59:40.070

There is a provision in HID for the keyboard language, but that requires that the OS 1) acknowledges it, and 2) honors it. – Ignacio Vazquez-Abrams – 2018-04-05T16:20:35.713

1@essjae In terms of hardware the internal keyboard (English) has less keys than the external one (Spanish), so they are physically different. For example the external ones has a key for the less-than symbol (<) and also the Ñ letter, than the internal one doesn't. – The Impaler – 2018-04-05T16:55:51.360

@IgnacioVazquez-Abrams Thanks, it seems there's light at the end of the tunnel (well... maybe). The USB HID field may be the solution to this problem. Unfortunately it seems most keyboard manufacturers don't deliver (yet) the "country code" info on this field; most don't bother and send an 0x00 (not supported) instead. It's a shame, this could help. – The Impaler – 2018-04-05T17:02:10.707

@TheImpaler The "<>" key of the Spanish layout is "|" in the English one and likewise the "ñÑ" key is ";:". This can be easily tested by toggling the different layouts. Keyboards of the same type with different layouts have the exact same number of keys and are NOT physically different, the difference is what's printed in (a few of) the keys. And the answer to all of your questions is NO (but I agree with you regarding the possibility of a better method). – None – 2018-04-05T18:48:53.850

@MichaelBay I beg to differ. The Spanish/LatinAmerican keyboard does have more physical keys. For example the "<" is an extra key between the "Left-Shift" and the "Z" key, making a total of 13 keys in that row. The English keyboard does not have it (only 12 keys in that row). So, in the English keyboard "Z" is the second key in the row, but in the Spanish keyboard "Z" is the third key in the row. – The Impaler – 2018-04-05T18:52:51.047

1In the English (US) keyboard you find the same key in a different place, typically at the very end of the line starting with QWERTY. It doesn't matter where the keys are actually. Still the same number of keys, still the same output codes that are interpreted differently according to the selected layout. So you can disagree as much as you want, it doesn't make it true. This is about facts, not opinions. – None – 2018-04-05T19:05:57.837

No answers