The basic stuff: I want to be able to switch apps with ⌘Tab, copy and paste with ⌘C and ⌘V etc.
3 Answers
You can swap Ctrl and ⌘ for most contexts with the following command:
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:swap_lwin_lctl']"
Alternatively, if you want to use a GUI to make the same change:
- install dconf-tools from the software center
- run the dconf-editor application
- navigate to org > gnome > desktop > input sources
- change the value of kbd-options to ['ctrl:swap_lwin_lctl']
That should take care of most shortcuts. The shortcut to switch windows can be changed from AltTab to something else on the standard keyboard shortcuts page in System Settings.
-
I can't seem to confirm that this works; I ran the command (and double-checked it in dconf-editor) and all <kbd>Ctrl</kbd> and <kbd>⌘</kbd> shortcuts are as they were. Commented Jan 9, 2016 at 22:48
-
1
-
3One issue is sometimes you really want
Ctrl
to beCtrl
, like while in a terminal and not the apple key.– RayCommented Dec 29, 2016 at 16:44 -
1@Ray I concur, the ideal solution would be for Elementary OS to start using
Super
like Mac usesCmd
and then when you really needCtrl
it is still available on the keyboard. Commented May 18, 2017 at 8:23 -
Confirmed that this works for most things now; however, it gets confusing very quickly because the keyboard shortcuts in the OS still refer to the original mappings. Commented Dec 6, 2019 at 7:04
How about remapping the keys? xmodmap should do the trick there.
Assuming that your command button is replaced with meta (I can't help you there, I don't own a Mac) this should work for you:
xmodmap -e "remove control = Control_L"
xmodmap -e "remove mod4 = Super_L"
xmodmap -e "add control = Super_L"
xmodmap -e "add mod4 = Control_L"
This will work until you end your session.
Permanent solution
1) Make ~/.Xmodmap
file.
2) Write this into it:
remove control = Control_L
remove mod4 = Super_L
add control = Super_L
add mod4 = Control_L
3) You should now somehow put xmodmap ~/.Xmodmap
to run at startup (I'm having trouble to find out how right now, will fix later).
-
I've tried all possible solutions i found online (putting in Switchboard > startup, putting it in ~/.xinitrc file, /etc/X11/xinit/xinitrc file, ...) but nothing happens. This could be a bug. You could put it in your .bashrc file but it will be ran only when you start the terminal. Commented Aug 15, 2015 at 6:07
Check this GitHub issue in the official Elementary OS repo https://github.com/elementary/switchboard-plug-keyboard/issues/69. It's a long story but it helps...
-
Hi @luiarhs! Thanks for sharing this resource answer. To make this into a complete answer, could you add a brief summary of that link's contents? Answers that consist of only a link are not considered complete in Stack Exchange sites. Commented Jul 27, 2021 at 21:21