0

I am a longtime OS X user who is using Ubuntu at work. While I like Ubuntu very much, something that I really miss is the behavior of the CTRL & CMD (i.e. Super) keys on OS X:

  • CMD/Super is used for most GUI shortcuts, such as copy/pasting, closing windows, ...
  • CTRL is mainly used for entering control keys in the terminal, i.e. CTRL+C generates a SIGINT.

While working in a terminal I can still use the same shortcuts for copying and pasting. I find this immensely practical. On Ubuntu I have to use the mouse and the contextual menu.

Is there any way I can make these keys behave like on OS X?

2
  • 1
    To copy/paste in a terminal, use Ctrl+Shift+C/V/X. These combinations are fixed, you can't change them. You may give KDE a try, where the Super key is a modifier key.
    – s3lph
    Sep 7, 2014 at 17:44
  • @the_Seppi it really answers my question actually. If you care to add it as an answer, I will accept it.
    – reg
    Sep 18, 2014 at 16:05

2 Answers 2

2

Here's how I've done it on my MAC book running Kubuntu :

  1. Use xmodmap to swap command key and ctrl key globally.
    a) Put the following in a file ~/.Xmodmap

    clear control  
    clear mod4  
    
    keycode 105 =  
    keycode 206 =  
    
    keycode 133 = Control_L NoSymbol Control_L  
    keycode 134 = Control_R NoSymbol Control_R  
    keycode 37 = Super_L NoSymbol Super_L  
    
    add control = Control_L  
    add control = Control_R  
    add mod4 = Super_L  
    

    b) Run the following command :

    $ xmodmap ~/.Xmodmap 
    

    This will make all your application use Command + .. instead of ctrl + .. except terminal
    Remember, your command key is now ctrl key

2. Modify shortcut keys for Terminal

a) In terminal application, go to "Configure Shortcuts"
b) Change the shortcuts for the following :

  • Cut - To 'Command + c '

  • Paste - To 'Command + v '

  • Interrupt - To 'Ctrl + c '

  • New Tab - To ' Command + t'

  • Close Tab - To 'Command + w'

  • Any other key your are particular about ..

3. Disable Meta key from invoking the app launcher [ kubuntu only ]

Add the following to ~/.config/kwinrc

[ModifierOnlyShortcuts]  
Meta=
1

You actually CAN use the Cut/Copy/Paste-Hotkeys in a terminal: You just have to additionally use the Shift key:

Copy: Ctrl+Shift+C

Paste: Ctrl+Shift+V

Cut: Ctrl+Shift+X


Some command editing shortcuts:

Delete one word: Alt+Backspace

Move cusrsor one word left/right: Ctrl+/Ctrl+


If you want to use the Super key as a modifier, there is no possibility to do so in GTK-based desktop environments. If this is a important feature for you, you could give KDE a try.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .