Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at
One less diacritical mark to annoy me

Being a Portuguese-speaking person living in the US, one of the things you have to get used to is the keyboard physical layout and key mappings. You know, Latin-originated languages tend to have thôse wéìrd chãraçtërs, which are really just diacritical marks applied to regular characters to differentiate words (sometimes it changes the pronunciation, sometimes i doesn't.)

To accommodate the extra characters, many countries define their own standard for physical keyboard layout. In Brazil the standards body is called ABNT and they came up with the layout that you can see below. It's a mild variation from the one used in the US and works well if you type in Portuguese most of the time.

Even when I was living in Brazil, when I started using computers at home and at work, it was easier to find a keyboard with a US layout than one with the ABNT layout (this situation has changed now.) I chose to stick to a keyboard with the US physical layout and, when in Windows — which was most of the time anyway — apply the US-International key mappings.

What happens when you use the US-International it that some keys become dead keys and when you strike them no characters are echoed. The OS waits for the next key(s) to decide what to print. For example, if I type [ " ][ a ][ b ][ c ] without the US-International mapping, I get (unsurprisingly) "abc. With US-International on I get äbc. I'd have to type [ " ][space][ a ][ b ][ c ] to get the intended text. Other dead keys are [ ' ],[ ` ],[ ^ ],[ ~ ].

Of all these dead keys, the ones that hit me the hardest are [ " ] and [ ' ] because I use them all the time when writing source code.

Where am I going with all this?

As of January 1st 2009 all Portuguese-speaking countries will start complying with an agreement that will cause some orthographic changes in the language. One of the new rules is that the umlaut (those two dots above some letters) is being dropped from the language.

I'm so happy with this decision that I simply could not wait until the US-International key mapping gets updated in some Windows update super Tuesday. I decided to take matters on my own hands and yank that nasty thing off my system.

How to create/edit keyboard layouts (mappings)

Microsoft published a cool little tool called Keyboard Layout Creator that allows you to create or edit the keyboard layouts.

It doesn't get much simpler than that. I installed and run this program. Then I loaded the existing US-International layout and saved it as US-International-No-Umlaut. Mousing over the ["] key would reveal that it indeed is marked as dead and show all the available combinations.

From there I just needed to right-click that key and un-check the option that was setting it as a dead key.

The next step is to compile the new layout into a DLL and create the setup package for it. That is done by the menu option Project > Build DLL and Setup Project.

After running the produced setup program, I could just go into the regional settings of my system and select the new layout (mapping) as my default setting.

If you are another Portuguese-speaking programmer and don't feel like going through the same steps, you can just download the setup files I created.

Now I just need to get rid of that muscle memory that I acquired after all these years.

Posted 12-26-2008 12:57 PM by sergiopereira



Busby SEO TEST wrote re: One less diacritical mark to annoy me
on 12-28-2008 12:19 AM

i didn't know that we can customize the keyboard. Thanks for sharing the tips.

Nicolas Irisarri wrote re: One less diacritical mark to annoy me
on 01-07-2009 2:24 PM

Hello Sergio. Great article, and I'm glad you took the time to post this.

Regarding the change to de US Intl layout, I think it's not going to happen. Other languages like spanish uses the ü char as well, so I think your solution will be most appreciated by your fellow portuguese speakers.  

I have always had this kind of nag with the dead letters and programming, so I'll try to move over this special chars to other combinations so I can use ' and " freely.

Thanks again!


sergiopereira wrote re: One less diacritical mark to annoy me
on 01-07-2009 2:45 PM


You're absolutely right. I don't know what I was thinking. Good thing I didn't wait :)

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)