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.

  • 1
    There'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 Apr 5 '18 at 15:59
  • 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 Apr 5 '18 at 16:20
  • 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 Apr 5 '18 at 16:55
  • @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 Apr 5 '18 at 17:02
  • @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). – user772515 Apr 5 '18 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.