Norwegian keys on US keyboard layout with .Xmodmap

Revision history
Tags: keyboard-layout norwegian xmodmap xorg

Was first looking at how to configure using xkbcomp and setxkbmap, but just went with .Xmodmap for simplicity. The Arch Linux wiki page on Xmodmap states that it’s not really the best way to go, but no way tends to be.

xmodmap settings are reset by setxkbmap, which not only alters the alphanumeric keys to the values given in the map, but also resets all other keys to the startup default.

The following .Xmodmap configuration binds Caps Lock as the modifier key to trigger the Norwegian on a US keyboard layout.

clear lock

! Caps-Lock
keycode 66 = Mode_switch ISO_Level3_Shift

! Norwegian characters æÆ øØ åÅ
keycode 47 = semicolon colon oslash Oslash
keycode 48 = apostrophe quotedbl ae AE
keycode 34 = bracketleft braceleft aring Aring

Usage

Caps-Lock is no longer a toggle switch.

References

If you have any comments or feedback, please send me an e-mail. (stig at stigok dotcom).

Did you find any typos, incorrect information, or have something to add? Then please propose a change to this post.

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.