2

I use Linux Mint Mate 17, which is based on Ubuntu 14.04, and I want to map my right Alt to act as a Ctrl key since I can reach it with my right thumb which is more comfortable. How can I do that?

I tried to search online, however most guides are based on using Xmodmap which seems to be deprecated. Some others use xkb, but I eventually gave up configuring it. One of the attempts was to add something like

key <ALTGR> { [ Control_L ] };

to xkb_symbols "pc105" section of /usr/share/X11/xkb/symbols/pc, but it didn't work. In fact, I understand neither why I should use specifically this file (there are a lot of them in symbols directory, and I've found include "pc" line only in macintosh_vndr/apple file), nor where I should learn the right name of the key -- RALT or ALTGR is just my suggestion, nor what the section name pc105 means.

After some more searching, I found out that the following command does what I want:

setxkbmap -option ctrl:ralt_rctrl

However, it obviously works only for the current session. I tried to add it to my .profile, but it didn't help. What is the right way to do this?

  • Mate, based on GNOME 2 – ars Oct 23 '16 at 18:33
  • I'm not familiar with mate but here's how to permanently add xkb options to gnome3 via dconf editor so it should be similiar... – don_crissti Oct 23 '16 at 18:34
  • Thanks for the suggestion, but it didn't work. dconf-editor is available for MATE too and I used it exactly like in your post (now xkb-options value is ['ctrl:ralt_rctrl']), but the mapping didn't appear. Do you know any ways to debug this? – ars Oct 24 '16 at 14:44
  • No, as I said I'm not familiar with mate... If it matters, the option works fine in gnome3 as I just tried it. If you're using a systemd setup you can always check journalctl -b (as a regular user) and see if you get any error about that option in input-sources... Otherwise try ~/.xsession-errors maybe you find something there. – don_crissti Oct 24 '16 at 15:52
  • GNU Linux Debian (stretch) has /etc/default/keyboard for XKBOPTIONS setup. – Van L Jul 11 '18 at 9:50

Your Answer

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

Browse other questions tagged or ask your own question.