enable ñ with German keyboard (custom keyboard)

check the current layout

$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     de
variant:    qwerty
$ sudo cp /usr/share/X11/xkb/symbols/de /usr/share/X11/xkb/symbols/de-ori
$ sudo vi /usr/share/X11/xkb/symbols/de

search for the right section, in my case xkb_symbols “qwerty” and add the following line:

key <AD12>  { [      plus,   asterisk,   dead_tilde,  dead_macron ] };
$ setxkbmap -layout de -variant qwerty

AltGr+~+n => ñ

reference: https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions

Scroll to Top