Assertfail

Using multiple keyboard layouts on Windows 10

24 Nov 2019

Why

C style programming languages are designed in the cultural context of having a English keyboard layout. Programming C style languages on a Swedish keyboard layout is somewhat awkward since you need to exercise finger gymnastics in order to use common characters like {}\. Unless you switch to Python the easiest fix is to use multiple keyboard layouts.

How

I started out by adding English (US) and then Swedish (Sweden) however, I ended up with a long list of keyboard layouts in the keyboard selection that comes up when you press WIN+space. Among those where layouts I couldn’t figure out how they ended up there. A coworker helped me out by telling me that what I wanted is to use the English (UK) language but with US keyboard, since otherwise you will end up with additional UK keyboard layouts.

What I wanted was this configuration preferred languages

but for the UK langauge you add the US keyboard layout that you prefer: language options

In my case it was the standard US keyboard layout:

expected output

UTF-8 issues in git-bash

A somewhat related issue is that you can have issues around locale in git bash. Following the instructions on stackoverflow should suffice.

Ok, so now Windows has updated and I’ve got three keyboard layouts

extra keyboard in menu

Note the extra keyboard layout and locale, could be for instance “English (United Kingdom)”, and add that locale and keyboard in the Language parts of settings.

Add the extra keyboard so that you end up with the extra keyboard:

temporary english UK and US keyboards

Then go ahead and delete that keyboard while making sure that your currently selected keyboard is not that one.

Tags


Comments or errors? Fork this post and do a pull request on github