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
Asked
Active
Viewed 5,070 times
6
2 Answers
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

ilyuha21st
- 181
3
I would add setxkbmap -option 'ctrl:rctrl_ralt'
to the startup applications
- Open up the startup applications menu by searching
startup applications
in the dash. - Click
Add
and set the command tosetxkbmap -option 'ctrl:rctrl_ralt'
. - (optional) Set the name and/or comment.
EDIT: Thanks @quixotic for the command
-
1don'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
-
-
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 -
setxkbmap -option 'ctrl:rctrl_ralt'
do what you want? (it won't survive logout/login but as a test ...) – quixotic May 26 '17 at 21:32xmodmap
is a deprecated tool. if it works for you, great, but i wouldn't recommend mixing anxmodmap
solution with an XKB solution. – quixotic May 27 '17 at 22:56