I use Manjaro with Deepin on an old MacBook with a German keyboard. I have set as a "German (Macintosh, no dead keys)" which is kind of usable, even if it does not allow me to access the alt keys imprinted on the keys (for instance the @ symbol is alt+q and not, as indicated on my keyboard alt+l). I can live with that.

But as I write Portuguese texts on a regular basis, I need to input the ñ and the ç characters all the time. These keys simply do not seem to exist on this keyboard, independent of any modifier keys. However, there are keys I have never used in my whole life, which I gladly would exchange for them, such as ¢ or ć and ń.

Which is the simplest way to achieve this? Or anything similar? Hacking in utf codes is not an option and appending different keyboards as well- this is after all a notebook.

  • Can I just direct you to xmodmap, the first aid kit for these things? I mean minor keyboard modifications? You have a very interesting situation - take a look at man xmodmap, maybe your distro's help, and "XKB" subsystem of X server first. To see what the options are.
    – user373503
    Oct 17, 2019 at 22:10
  • xmodmap just for swapping those keys I mean. To get these curls on the n and under the c (I have some dots to put here and there too ;)
    – user373503
    Oct 17, 2019 at 22:14
  • Yeah, I am reading about xmodmap right now. Only whatever I find already assumes a certain understanding which I currently lack. I need the for dummies entrance here, I am afraid.
    – Jan
    Oct 17, 2019 at 22:27
  • unix.stackexchange.com/questions/546630/keyboard-mapping/… here somebody just recently found useful info. See the recommended link.
    – user373503
    Oct 17, 2019 at 22:35

2 Answers 2


I put this content into a .Xmodmap file in my home directory:

keycode  54 = c C c C ccedilla Ccedilla copyright 
keycode  57 = n N n N ntilde Ntilde asciitilde
keycode  46 = l L l L at
keycode  38 = a A a A atilde Atilde atilde

then I execute xmodmap ~/.Xmodmap and become a happy puppy.

How did I get to this result?

I ran xmodmap -pke > current_xmodmap.txt, which lists the current configuration in the abovementioned format. I opened the file in a text editor to search for things I would like to change. All keys show up there, so there is no chance to miss something.

At http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap one gets a list of all possible keys.

So with these two bits of information at hand, it becomes a possible task to create a file that patches the system's Xmodmap to something fitting your expectations.

  • I see! Once you know something is supposed to work, you will make it work. Nice job, I don't even understand exactly. You helped yourself by asking here. Todo bem! aues i ordnig! I have to brush up my spanish. I mean, portuguese, always mix it up. Do you need ntilde to spell Ronaldinho?
    – user373503
    Oct 17, 2019 at 23:43
  • Actually I do not need n tilde at all :) ... I was so mixed up in technicalities, that I forgot I actually needed a tilde. N tilde does not even exist in Portuguese :)
    – Jan
    Oct 18, 2019 at 12:20

...and maybe you could get those parts of glyphs with the

dead keys

variant? If that is an option? If you switch to that variant, if exists?

That would be rather with setxkbmap, or localectl to get information about layouts, variants and options.

The XKB files are in /usr/share/X11/xkb/ Have a look at "rules" directory to see/search for your parts.

  • No, these glyphs simply are impossible to compose on an unmodded German keyboard. If you have an English keyboard, you can switch to us_intl (or something alike) and you can compose all of them. Unfortunately, my MacBook has a German layout, so this is not an option.
    – Jan
    Oct 18, 2019 at 18:33
  • Actually there is this line: keycode 21 = dead_acute dead_grave dead_acute dead_grave dead_cedilla dead_ogonek dead_cedilla! One can access this with alt+´ and c!
    – Jan
    Oct 18, 2019 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .