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 4,566 times
6
-
does `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:32
-
How did you map right alt to ctrl? – Wilf May 26 '17 at 23:33
-
https://askubuntu.com/questions/237564/remap-right-alt-to-behave-as-right-ctrl – Alex Vaewsorn May 27 '17 at 00:26
-
`xmodmap` is a deprecated tool. if it works for you, great, but i wouldn't recommend mixing an `xmodmap` solution with an XKB solution. – quixotic May 27 '17 at 22:56
2 Answers
3
I would add setxkbmap -option 'ctrl:rctrl_ralt' to the startup applications
- Open up the startup applications menu by searching
startup applicationsin the dash. - Click
Addand 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
-
2
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
- 171
- 1
- 7