Using Alt key like the mac command (⌘) key for copy/paste

I'm coming to Linux from mac and most of the command () shortcuts I'm used to translate in a straightforward way to Linux using Ctrl.

But copy/paste is awkward. In terminal I need to use the Shift modifier (since ^C and ^V serve other purposes in that context). This adds both physical (extra press) and mental overhead (I have to remember which shortcut to use based on which application I'm currently in).

I started wondering, why not configure my machine to use Alt instead Ctrl for copy/paste? That would make them physically identical to what I'm used to on mac, and it doesn't seem like anything's currently using those keys.

I'm a heavy user of:

  • terminal
  • vim
  • emacs
  • chromium
  • slack

I already changed the copy/paste shortcuts in my terminal, but I'm wondering three things:

  1. Is there a good way to configure this globally, rather than ad-hoc per application?
  2. Is there some other purpose that Alt+C and Alt+V usually serve in a Linux environment?
  3. Is there any other reason not to do this?

Update

The problem, I found, with changing terminal copy/paste to use Alt was that it made it even harder to remember which key to use (am I on Mac? on Linux? on Linux in the terminal?).

I'm now trying a different compromise, which so far I find works (for me): use Alt+Ctrl in the terminal and leave it at Ctrl elsewhere. I like this because:

  • Alt is more comfortable than Shift
  • Ctrl remains part of the equation, and I find that consistency easier to remember
  • I have to juggle Alt and Ctrl anyway, depending on whether I'm on Mac or Linux; easier to juggle those two keys than to introduce Shift to the mental overhead as well.

1 Answer

I'm looking for the same answer, but I haven't found a good solution yet.

In the interim, I've swapped my alt, ctrl which helps with keeping my muscle memory.

This might work for you in the mean time:

setxkbmap -layout 'us,us' -option 'ctrl:swap_lalt_lctl'

And you might have to keep Gnome from resetting your layout:

sudo gsettings set org.gnome.settings-daemon.plugins.keyboard active false

Hopefully someone a little bit more knowledgeable will provide a solution to keep from using Shift+Ctrl+c in the terminal.

[EDIT] Turns out the settings don't last past a reboot. I set this in my xorg.conf

Section "InputDevice" Identifier "Keyboard0" Driver "kbd" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us" Option "XkbOptions" "ctrl:swap_lalt_lctl"
EndSection 
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like