6

I've got right alt remapped to ctrl (via remap right alt to behave as right ctrl), now I need my ctrl to be an alt. thanks for help with this

quixotic
  • 1,242
  • 10
  • 12

2 Answers2

3

You may achieve the result by editing the /usr/share/X11/xkb/symbols/pc file. Find the line starting with key <ALT> and replace Alt_R to Control_R. If you want to swap right control with right alt, you need also find the line starting with key <RCTL> and do analogically. Then relogin to the system. Works on Ubuntu 18.10 gnome-shell 3.30

3

I would add setxkbmap -option 'ctrl:rctrl_ralt' to the startup applications

  1. Open up the startup applications menu by searching startup applications in the dash.
  2. Click Add and set the command to setxkbmap -option 'ctrl:rctrl_ralt'.
  3. (optional) Set the name and/or comment.

EDIT: Thanks @quixotic for the command

  • 1
    don't do that. that's a good testing command to make sure the change works; under GNOME or KDE its changes will be reset very quickly. – quixotic May 26 '17 at 22:00
  • What do you mean by reset? –  May 26 '17 at 22:00
  • 1
    @quixotic - could you please then add a answer on how to change it permanently? – Wilf May 26 '17 at 23:38
  • It would follow this format, which works well https://askubuntu.com/questions/237564/remap-right-alt-to-behave-as-right-ctrl But I'm too inexperienced to figure out the specific remap I'm looking for – Alex Vaewsorn May 27 '17 at 00:25
  • @wilf no. on further information from the OP this question is seeking an xmodmap solution. i can't help with that. – quixotic May 27 '17 at 22:59
  • @quixotic it doesn't have to mix as long as it replaces it – Wilf May 28 '17 at 11:55