2 January 2016

Editing your keyboard



I live in France but communicate mainly in English. However, I do need to write in French on a regular basis and so to get the accents French requires like ç, è, û and à, along with non-French characters like ß, °,©, ®, ñ, ¿ and ¡ along with the em-dash —.

I could memorise all the alt-numpad codes for these characters (and have memorised my most used ones like alt-0231 for ç, alt-0232 for è or alt-0224 for à, but it's a fag to do so and takes longer to type. So I was very happy when I discovered the Microsoft Keyboard Layout Creator. It allows me to assign specific codes to keys. I already use the AltGr key to use the acute accent character é and to get a € symbol, but á isn't exactly often used in French and nor is ó, í or ú so it makes sense to remap these keys and learn the appropriate alt-numpad code for them if I ever need them (I don't think I have in 14 years of living in France).

You should really plan out all the keys you want to remap and where you want to remap them to before you start all this, but because I'm an impetuous sort and wanted to try different options out, I didn't, which meant I got problems with having to rename the layout and change the description to make sure it's unique.

When you install the MKLC and open it you will see a window that represents your keyboard, but empty of characters for the time being.

In the File menu choose Load Existing Keyboard... to load your current keymap to edit it.

As you can see I've already had loads of goes at this. The additional entries should all go on a reboot

The keys will then be populated and you can use the toggles to the left of the keyboard to see what modifiers are available or can be changed.

Then it's a simple matter of clicking a key and adding your own definition — you can even have a single key type a sequence of up to four characters.

Once you have added the custom keys you want, visit the Project menu and choose Validate Layout. It will probably ask you to create unique settings for name and description if you are basing your customised layout on an existing one.


Once you have that set as you like use the Project menu again and choose Build DLL and Setup Package.
If all goes well, there should be a new folder in your Documents folder (by default although you can choose where to make the setup folder) containing some MSIs and a Setup.exe. You can directly click on the MSI you need if you know which one to use, or simply start Setup.exe, which will choose the right MSI.

Next, you will want to make sure that your customised keymap is chosen as a default. I added the language bar from my Control Panel so I can switch between keyboard layouts in case anything goes wrong, but you can of course simply remove the standard keymap in favour of your customised one.


In the Language bar settings, make sure your new keymap is set as the default and move it up in the list. To make it clear at a glance if I was in my customised map I changed the colour of the icon too.


Hopefully this will work as well for you as it has for me! :)


No comments: