0

I would like to write symbols ñ (ntilde) and Ñ (Ntilde) on a British keyboard using AltGr + n and AltGr + Shift + N.

I have modified the keymap with xmodmap:

$ xmodmap -e "keysym n = n N ntilde Ntilde"

and it seems to be correct:

$ xmodmap -pke | grep "Ntilde"
keycode  57 = n N ntilde Ntilde
$

However, nothing appears on screen when I press AltGr + n or AltGr + Shift + N (on any application).

What am I missing?

Additional information:

  • The problem seems to occur in Ubuntu 16.04 LTS. I used xmodmap successfully on Ubuntu 12.04 LTS.
  • I have tried two different keyboard settings: English (UK, extended WinKeys) and English (UK, international with dead keys).
  • Following a comment, I also tried English (USA, international with dead keys): the accented letters (such as á) worked but the ntilde and Ntilde did not.

PS: I am happy to write those letters in other ways too, so answers pointing to alternative ways are also welcome, but this question focuses on the use of xmodmap because I have used it successfully in past Ubuntu distros.

  • It works fine on mine with US keyboard. The thing is you also need to select the variant with "dead keys". There's no way to type accentuated characters with plain English US or English UK. – user589808 Dec 30 '16 at 22:20
  • Thanks for your comment. I have tried on several variants with no effect. I have edited the question to make this more explicit. – sergut Dec 30 '16 at 22:57
2

On English (UK, international with dead keys) the dead_tilde symbol is available via Shift+#, so pressing

  • Shift+# followed by N results in ñ
  • Shift+# followed by Shift+N results in Ñ

On English (UK, extended WinKeys) dead_tilde is available via AltGr+# instead. Hence typing ñ and Ñ isn't a reason for you to mess with xmodmap.

  • I have waited a few days before selecting this answer (because it provides a solution to my ñ/Ñ problem but it does not deal specifically with the xmodmap issue). As it looks like there will be no more answers, I am selecting it now. – sergut Jan 4 '17 at 21:51
  • @sergut: Thanks. An additional reason why I didn't comment on xmodmap, besides the fact that it's not necessary to type ñ/Ñ, is that I don't know enough about it. ;) If you still want help with getting xmodmap to work, I'd suggest that you ask specifically about it in a new question. – Gunnar Hjalmarsson Jan 4 '17 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.