1

I just installed Lubuntu 17.10 on a an old MacBook (unibody 2006). The keyboard as no Alt or AltGr key on the right, and a Alt and Ctrl keys on the left.

If I press Ctrl+Alt and a key , I don't get the alternative characters like [ ] | \ and many more.

Is there a way to get these characters with different key combinations ? Or maybe to map a key that I don't use often (like the right super key) to be the AltGr key ?

0

So I figured it out.

First of all, I had picked the wrong keyboard model I think (you do that from the "Keyboard Layout Handler Settings" in Lubuntu). I chose "applealu_iso" instead of "macbook79" (internaltional variant of us "macbook78").

But that didn't solve the problem. As there is no "3rd modifier key" (also called ALTGR or RALT for Right Alt) on the macbook pro keyboard. But there is 2 Super keys ("Apple" option keys, the equivalent of the "Windows" key on PC keyboards). Those 2 super keys have the same effect but I never use the right Super key. So I decided remap the right Super key as my 3rd modifier key (ALTGR/RALT).

So here is how to do so (this article heped a lot https://medium.com/@damko/a-simple-humble-but-comprehensive-guide-to-xkb-for-linux-6f1ad5e13450 ).

Use the following command in a terminal to get the key codes xev -event keyboard On my macbook I pressed the right super key, and the code returned was 134 Press CTRL C to exit, then edit this file /usr/share/X11/xkb/keycodes/evdev and reverse the codes for RALT and RWIN this way :

<RALT> = 134; //modif old code was 108;
<RWIN> = 108; //modif old code was 134;

(Note there's probably a cleaner way to do this, editing the /usr/share/X11/xkb/keycodes/macintosh file for example, that contains the mappings for the macbook78/macbook79 models, or even better create a new keyboard model, in order this is not overwritten by updates)

To apply your modifications, try to type "sexkbmap fr" or "setxkbmap us" depending on the layout you use, or reboot if you're not sure.

And that's it, it works now, I can get all my 3rd modifier keys (with the SHIFT variant as well).

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.