Typing Danish letters without a Danish keyboard
The Danish alphabet has three more vowels than the English alphabet. And as they come in lower and upper case forms, you end up with six extra characters: æ, ø, å, Æ, Ø, Å.
On Danish typewriter and computer keyboards these letters are located in a little cluster to the right of the L and P keys (causing some rotation of the characters that are located there on other keyboards), and of course they’re completely absent from all keyboards bought anywhere outside of Denmark.
Fortunately the three letters have accepted substitutions: You can write “ae” instead of æ, “oe” instead of ø and “aa” instead of å, and most Danes will understand it. But it looks like crap. When you write an email or a blog comment in Danish, you’ll want to make a better impression than that.
Some programs (especially word processors) will allow you to “insert character” and let you pick the right character from a large character set. This works for entering the odd Greek letter, the symbol for degrees, etc., but it just doesn’t work for writing any length of text with more than a couple “special” vowels; and many of us do most of our writing in text editors and browsers anyway. So we need a more general solution.
AutoHotkey to the rescue
I’ve previously written an introduction to AutoHotkey as a part of the series a month of free software. This brilliant, free, cross-platform utility is excellent for handling everyday tasks like this.
I wanted an easy way to access the Danish letters on a non-Danish keyboard, i.e. a way to invoke for example “æ” through some key combination. It was obvious to use the accepted substitutions (e.g. ae=æ) but I didn’t want the mechanism to make the substitution every single time I use the two letter combinations as that would affect all my English writing as well. I needed some type of “hotkey” scheme so the substitution only happened when I explicitly asked for it.
I’ve seen many utility programs that pick a rarely used key as the trigger for special actions — for example one of the function keys at the top of the keyboard, or a combination of Alt or Ctrl and some other key, or the “`” key.
But I wanted something that was easy and fast to type. After all you want to trigger on the whole combination anyway, not on the trigger key itself, so there’s no need to use a key like a function key or “`”. Instead I use the comma (“,”). It’s easy and quick to type, and it’s usually only used in very specific ways in written English (it’s usually followed by a space or a digit).
So here are my six character substitution rules for AutoHotkey:
:?*:,ae::æ
:?*:,oe::ø
:?*:,aa::å
:?*:,AE::Æ
:?*:,OE::Ø
:?*:,AA::Å
The two hotstring modifiers have the following effects:
- * (asterisk): An ending character (e.g. space, period, or enter) is not required to trigger the hotstring.
- ? (question mark): The hotstring will be triggered even when it is inside another word; that is, when the character typed immediately before it is alphanumeric.
Include the six hotstring definitions in your AutoHotkey file, and now whenever you type a comma and any of the two-letter combinations, you’ll get the correct Danish letter. This works across all programs and all windows, independently of your operating system’s regional settings, etc.
And now, in German and Swedish and French and …
No, I haven’t written substitution rules for other languages (because I’ve never needed them). But if you need them, you can make them very easily in the same way. You can make all the various accent-letter combinations for French, you can create umlaut vowels for German and Swedish (and heavy metal band names), etc.
If this was useful, please leave a comment below. Also of course if you’ve figured an even better way to make special/regional characters accessible on non-localized hardware.
No related posts.
28 Comments to “Typing Danish letters without a Danish keyboard”
Leave a Reply

Great idea. Thanks. I have my keyboard set to toggle (in Windows) to a Danish keyboard, but I keep forgetting where all the other things have landed so I have to toggle back to English to get the ones I’ve forgotten.
I will also make codes for é, which I enjoy having on the Danish keyboard, and the Spanish n.
Ah yes, I used to do that. You can even set it up with a hotkey to quickly switch between layouts. But in order to see the current status, you have to have the language bar with the little “EN” (and “DK”, etc.) icon showing on the taskbar.
Tangent: I can’t believe how many people have the language bar showing on their computers even though they never, ever use it. It’s just there because they never changed a default setting (set by MS Office installing, I think).
Yeah, nice idea. On a Mac this can be a bit challenging as well.
One way around this is you have the option to use the Danish keyboard. It takes a bit to get used to where the ‘new’ keys are, but it is very useful when you are typing more than just one or two words.
Here are some ways To make the letters in WindowsXP:
There are several ways to make the Danish letters in Windows. Here are some for you to choose from:
1. Instructions for setting up WinXP so that its keyboard can toggle between English and Danish.
1. Click on Start and go to Control Panel.
2. Open Regional and Language Options.
3. Click on the Languages tab
4. Click on the Details button.
5. Click on the Add button.
6. Open the Input language window by clicking what’s in it.
7. Scroll to Danish, select and click OK ONCE.
I used to do that (installing Windows’ built-in Danish keyboard configuration), but once you’ve got a (physical) non-DK keyboard, it gets too confusing. Too many other characters are at other locations, basically every key that’s not a letter or a number: `~!@#$%^&*()-_=+[]\{}|;<>:. In other words, all the punctuation and syntax bits that are needed in an average geek’s daily typing.
But if somebody wants to follow that tip, note that you can also set up a keyboard combination to switch between the languages, e.g. Alt-F1 to switch to English, Alt-F2 to switch to Danish. That makes switching a lot faster and more convenient, I found.
Thanks a lot!
If I don’t have XP will this work?
Because of the script containing dansh letters, the notepad can’t save the file in ANSI format. When I chose the unicode format the script won’t run, and when i use the UTF-8 format it runs but I get wrong letters written out . When writing the ‘,aa’ for example i get Ã¥. How can I get around this problem?
P.S. When saving scripts not containing danish letters they work OK.
Brrr, I hate character set issues… not surprising for a Danish 25+ year computer techie veteran.
I use the standard Windows 7 install (US English) and US country settings (or maybe Canadian, I don’t remember). I’m not sure what’s different in your setup.
type‘d the file from the command prompt and it looks like this.These are the characters in decimal:
You are not sure what’s the difference in my setup, but i certainly am. I don’t know the name of the setup, but what’s special about is that its Hebrew enabled: you just press alt+shift and it toggles from English to Hebrew or opposite. So when it’s not a problem in your PC it must have to do with the Hebrew. When I open the code in Danish made html documents I see Hebrew letters instead of æ, ø, å, Æ, Ø and Å. I pasted these Hebrew letters into the script document and the hotkeys now work for æ, ø and å but Æ, Ø and Å are written out as small letters in stead of capital. I don’t mind though, I’m happy having hotkeys æ, ø and å, the capitals are seldom used (except for city names: Æbeltoft, Ålborg, Århus etc.) and if you write in M. Word you can just type a point and then a letter and it changes automatically to capital.
Thank you very much for the ideas and the help.
Sdl » Ahem! There’s no “Å” in “Aalborg”! Map, Wikipedia.
I just purchased a new computer for my 79-year-old Danish mother, who lives in the USA. Being able to type easily in Danish was on her wish list. She will love this. Thanks for this info. You are a Great Dane!
Let me understand something right, Im a Dane, and if I get a notebook with a English keyboard i can use the ÆØÅ by switching to a Danish keyboard layout?
Michael B. Pedersen » Yep: Just install the Danish keyboard setting alongside the US/UK/whatever keyboard setting. When you switch language, Windows will treat your ;’[ keys as if they were æøå.
Update: Hmm, I just read the latest post on your blog (“Ingen ASUS EEE 1201N til Danmark… og resten af Norden“) and it looks like you knew that. Did I misunderstand your comment?
Hi
I have just bought a computer in Belgium – It has an english keyboard and during setup I wrongly choose ‘danish language’. Now my keyboard is a totally mess, eg. q and a is switched and w and z. How do I change back to an english keyboard? I have Windows 7.
Cheers Morten
Hi Morten
That sounds odd: On Danish and US keyboard layouts the A-Z letters are in the same locations, so I’m not sure what has happened in your case. But here’s how to change the keyboard layout in Windows 7:
Go to Control Panel > Region and Language > Keyboard and Languages > Change Keyboards
Now add a new keyboard layout (and then remove the Danish layout you no longer want). It’s a nice touch that “Properties” for a keyboard layout here gives you a graphical view of the keyboard layout so you can compare against your physical keyboard.
Tusind tak! Lige hvad jeg havde brug for. Have a nice one.
Fedt! For ja, det ser sku dumt ud.
For Mac users with English keyboards, you can just use these simple default shortcuts…
æ = alt+’
ø = alt+o
å = alt+a
Just add the shift key too for the uppercase.
Sure, you can assign keyboard shortcuts like that on Windows as well. But the idea was that you just use the letter combinations that you’d be using anyway (ae, oe, aa) with the comma (or whichever other character you prefer) thrown in as an “activator”. This frees the typist from having to hit a modifier key (alt) simultaneously with a character key, and allows for faster typing.
Hi Jan, Years ago I programmed my PC (windows XP)such that
Alt+e produced æ, Shift+Alt+e produced Æ etc for the 4 other danish vowels using a & o instead of e.
I now have a new computer (windows 7) and I want to program it to do the same. But I can’t remember how I did it. I have the character map with all the codes but cannot figure out how to program it.
Can you help please?
Thank you so much, Knud Knudsen
P.S. If you ever come to Palo Alto, CA I’d like to offer you samples of some excellent wines I have made!
Hi Knud, well, I don’t know what you did back then either.
But you can use AutoHotkey to achieve the same effect. Since you want to replace individual keystrokes, the codes are actually simpler than the text replacement codes in this blog post. The six keyboard redefinitions look like this (!e means Alt+e, +!e means Alt+Shift+e, etc.):
!e::æ
+!e::Æ
!a::å
+!a::Å
!o::ø
+!o::Ø
Held og lykke fra Vancouver!
Jan, you are a gentleman and a scholar. Thanks so much for spelling this out quite simply for us who wanted a better solution. I’ll be sharing this with all my co-workers who have English keyboards and have to type Norsk regularly. Tusind tak!
Hi,
Thank you for this tutorial. I am searching a method how to write dannish character and landing in your site. Thank you very much
very nice text and useful information! thanks!
Hey love your work. Very easy to apply etc
Hey, thanks ALOT!
My keyboard kept typing these letters and signs after I spilled coke on my keyboard.
f.eks, every time i typed the letter “o” the number 7 always appaired infront or after “o7″ or “7o”
I did as you did, just removed the comma, and changed ae, aa ect to o7 and did the same with every other letter that was like this, and now my keyboard is working perfectly!
That is FUNNY, Tookey! It might be better to get yourself a new keyboard. They’re not very expensive, you know.
one up – top nice