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.Cassidy James Blaede– Cassidy James Blaede2016-01-09 22:48:14 +00:00Commented Jan 9, 2016 at 22:48
- 1Cassidy, try logging out/rebooting.Heath Paddock– Heath Paddock2016-01-10 00:58:05 +00:00Commented Jan 10, 2016 at 0:58
- 3One issue is sometimes you really want
Ctrlto beCtrl, like while in a terminal and not the apple key.Ray– Ray2016-12-29 16:44:39 +00:00Commented Dec 29, 2016 at 16:44 - 1@Ray I concur, the ideal solution would be for Elementary OS to start using
Superlike Mac usesCmdand then when you really needCtrlit is still available on the keyboard.Anriëtte Myburgh– Anriëtte Myburgh2017-05-18 08:23:34 +00:00Commented 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.Cassidy James Blaede– Cassidy James Blaede2019-12-06 07:04:29 +00:00Commented 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.Dušan Gvozdenović– Dušan Gvozdenović2015-08-15 06:07:40 +00:00Commented 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.waldyrious– waldyrious2021-07-27 21:21:48 +00:00Commented Jul 27, 2021 at 21:21