January 15, 2020 — Technology

How to Type Nordic Letters on Foreign Keyboards

It's really hard to press a key that's not there...

Early programming languages were created mostly by Americans and Brits. These early languages shaped syntax that most modern languages more or less share. Basic C code will look familiar to many programmers mainly because C was likely the starting point for the syntax design of those languages. Here’s a small example:

#include <stdio.h>

int main(void) {
    int num1 = 10;
    int num2 = 8;
    printf("No, I am not a minor, I am %d years old.", num1 + num2);

    return 0;
}

And the same in Javscript 😖 (forgive the if statement, that’s a surprise tool for later)

let num1 = 10;
let num2 = 8;
if(true) {
    console.log("No, I am not a minor, I am " + num1 + num2 + " years old.");
}

As you can see you, there’s several similarities. { and } denote code blocks. ; to end lines. ( and ) to call functions. " for strings. All of these choices are brilliant when you’re programming on American (or derivative) keyboards, but on other keyboards it can ruin the flow.

I am Danish, so when I talk to my friends back home, I need my trusty æ, ø and å. I am also a programmer, so Danish keyboard layout is out of the question. Are you in a similiar boat? Here’s how I solved it.

æ, ø, å on Windows

Install AutoHotKey and put the script below that fits your needs in your startup folder. You can find your startup folder by pressing Win+R and then shell:startup.

Spare keys

I have a trusty Apple Keyboard where the F keys go all the way up to F19. So it works quite to map the new letters to F13, F14 and F15.

#NoEnv

F13::æ
+F13::Æ

F14::ø
+F14::Ø

F15::å
+F15::Å

Sacrifice keys

If you don’t have any spare keys, you can override three existing ones. Overriding F10, F11 and F12 is probably not a good idea.

#NoEnv

F10::æ
+F10::Æ

F11::ø
+F11::Ø

F12::å
+F12::Å

Peaceful co-existence

You could assign the letters to three existing keys but use a modifier such as alt. The modifier symbol for alt is !. Control is ^. # is the Windows key.

#NoEnv

!F10::æ
!+F10::Æ

!F11::ø
!+F11::Ø

!F12::å
!+F12::Å

More from Technology

10 Best Looking Themes for Visual Studio Code

January 21, 2020 — Technology

Syntax and editor themes preferences vary wildly from programmer to programmer, but I still wanted to share my favorite themes in the hopes…

How to Type Nordic Letters on Foreign Keyboards

January 15, 2020 — Technology

Early programming languages were created mostly by Americans and Brits. These early languages shaped syntax that most modern languages more…

Apple Music on Windows; How to Get a Good Experience

November 15, 2019 — Technology

Apple just killed iTunes on their latest macOS 10.15 release, but Windows users are still stuck using a highly unoptimized iTunes if they…

Latest posts

Game of the Month: Rimworld

May 31, 2020 — Game of the Month

Today, I'm returning with another rendition of "Game of the Month." This month my life has consisted of eating, sleeping and playing…

Game of the Month: Doom (2016)

April 26, 2020 — Game of the Month

Welcome to a new blog post series that I will presumably abandon immediately after posting this. In this series, I will post my favourite…

Chrome OS Is Insanely Powerful

February 05, 2020 — Chrome OS

I'm a big fan of Linux and I use it whenever I can. Unfortunately, most of the Linux distros I tried on my laptop didn't run that well. I…

10 Best Looking Themes for Visual Studio Code

January 21, 2020 — Technology

Syntax and editor themes preferences vary wildly from programmer to programmer, but I still wanted to share my favorite themes in the hopes…