I'm so used to the comfortable layout of Apple keyboards and I like to use the command key for the most often used combination shortcuts (command-C for copy, command-V for paste and so on), which is very easily accessed with my left thumb. When I switched to other computers (running Linux specifically) I found it very uncomfortable to use the control key instead of command for the same combos, which instead requires the use of the pinkie finger. I just wonder what other Linux converted solutions are, rather then assign different keys function through the Desktop Environment configuration tools.

  • I'll take it a step further: I like the really light resistance of these keyboards as well.
    – iAdjunct
    Feb 29 '16 at 3:12
  • Please add your Linux system specification (version, if KDE or other...). BTW you may find interesting this answer... Are you using a Mac keyboard connected to linux?
    – Hastur
    Feb 29 '16 at 5:04

I would suggest that you try two things:

  1. Use an Apple keyboard with your Linux box.
  2. Configure your keyboard so that Ctrl is mapped to Command and vice-versa.

To accomplish #2 you need to change the keyboard mapping. There is an article that describes this process here: https://askubuntu.com/questions/131900/how-do-i-switch-the-command-key-and-control-key-on-a-macbook-pro

Even though the article is aimed at Ubuntu users, the tool it describes is the same in all Linux distros. This only needs to be done on the computer to which the physical keyboard is connected.


Which distribution of Linux are you using ? Or which OS ? I know ubuntu can handle a lot of keyboard language preferences. You may try to use an Apple keyboard and set your preferences to qwerty English Mac OS X.

Switching your ctrl to cmd button might be an alternative but I found it dirty.


Update 02/03/2020

Kinto has now been rewritten in C for Ubuntu/Debian systems using x11. It also uses json config files, making it easier to manage and extend to other applications than just terminals. The app no longer maps to Super in the Terminal apps, it will now properly map to Ctrl+Shift to create the exact same feel as having a Cmd key.

Please checkout the latest release. https://github.com/rbreaves/kinto

The main change to allow for the Super = Ctrl+Shift change is in this symbols file.

default partial xkb_symbols "mac_levelssym" {
    key <LWIN> {
      repeat= no,
      type= "ONE_LEVEL",
      symbols[Group1]= [ Hyper_L ],
      actions[group1]=[ SetMods(modifiers=Shift+Control) ]
    key <RWIN> {
      repeat= no,
      type= "ONE_LEVEL",
      symbols[Group1]= [ Hyper_R ],
      actions[group1]=[ SetMods(modifiers=Shift+Control) ]

You may find Kinto to be useful. It's a project I recently created, after a few years of tackling this problem a few different ways and I just now feel like it's solid enough to share.

The Kinto installer simply uses python to do the initial install, after that it's just a systemd service, bash, xprop, setxkbmap and xkbcomp. As far as I am concerned it is the fastest and most native solution to this problem that you are going to find.



Here's a Gist as well, if you just want to see what is at the heart of it all, it will not alternate your keymap when needed though. The Gist also does not include custom xkb keymap files that setup macOS style cursors/word-wise manipulations that use Cmd and the arrow keys.


gist content

# permanent apple keyboard keyswap
echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf
update-initramfs -u -k all

# Temporary & instant apple keyboard keyswap
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd

# Windows and Mac keyboards - GUI (Physical Alt is Ctrl, Physical Super is Alt, Physical Ctrl is Super)
setxkbmap -option;setxkbmap -option altwin:ctrl_alt_win

# Windows and Mac keyboards - Terminal Apps (Physical Alt is Super, Physical Super is Alt, Physical Ctrl is Ctrl)
setxkbmap -option;setxkbmap -option altwin:swap_alt_win

# If you want a systemd service and bash script to help toggle between
# GUI and Terminal applications then look at project Kinto.
# https://github.com/rbreaves/kinto
# Note: The above may not work for Chromebooks running Linux, please look
# at project Kinto for that.
# If anyone would like to contribute to the project then please do!
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
    – DavidPostill
    Aug 7 '19 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.