I just got a replacement for my old Toshiba notebook, a Lenovo ThinkPad T430 from a German refurbisher. I love it! The thing is, it came with a German keyboard, and it’s not quite obvious to figure out how to type the eñe character in it. Since I am from Latin America, I use it all the time, so I was kind of annoyed until I found out the way to do it…
I needed to change the X.org server keyboard configuration, as it turns out the tilde (~) diacritic mark is available in the T3 variant of the German layout, but it’s not in the default layout. So I entered this command:
$ setxkbmap -layout de -variant T3
To set the T3 variant for the current X session only. In order to make it persistent, use localectl to save it in the X configuration files.
$ localectl set-x11-keymap de T3
Now you can type AltGr+i, then n, to get ñ!