Keyboards & languages

· by Steve · Read in about 2 min · (418 Words)

This has bugged me on and off for a while - very, very occasionally I’d be working away in Visual Studio and suddenly my @ symbols would start coming out as double-quotes, a symptom of the condition known as ‘crazy Yankee keyboard syndrome’. I hadn’t figured out what triggered this, especially as all other applications were unaffected, and it happened little enough, and when I was busy enough, that I didn’t take time to find the cause and just lived with it until I restarted VS.

Well, I finally bothered to figure out why today - I use a lot of keyboard shortcuts, and some of my favourites are related to Visual Assist, such as:

SHIFT-ALT-S - Find Symbol…

SHIFT-ALT-O - Open File in Workspace…

Both are extremely handy for jumping around a large project without touching the mouse (both have dynamic completion windows - start typing to limit the massive list).

The problem is that if I missed the ‘S’ or ‘O’ in the above combinations, something that didn’t happen often enough for me to realise the connection, I ended up triggering a per-application language change, which is bound to SHIFT-ALT in Windows - pressing (and releasing) that combination cycles through the available languages, and Windows always insists on installing the US keyboard layout even if you pick British as your default.

Quite why you would want to switch keyboard layouts dynamically for just one app at a time, rather than globally for all apps, I have absolutely no idea, but at least I know now. Removing the extra US keyboard layout from my regional settings made sure I can’t trip over that anymore 😀

Which reminds me - using a real US keyboard on the occasion I’m in the States is awkward, mostly because the return key is a completely different shape (wide and short like a shift key, instead of tall like on a British keyboard). However, it’s manageable and was put in perspective when I was in Sweden recently, where I briefly used (IIRC) a Swedish physical keyboard but with German language settings loaded. All the symbols were in different places, but also didn’t do what was printed on the key. It was like some bizarre cognitive experiment - all it needed was electric shocks when I pushed the wrong key. Trying to do any coding on that was like trying to defuse a bomb after someone has randomly rewired the nerves to your fingers, so moving your thumb actually moves your pinky. Perplexing.