Ubuntu – How to make keyboard work like OSX System Wide

shortcut-keys

I switch back and forth between two computers constantly:

  • OSX Snow Leopard
  • Ubuntu 10.10

I'd like to be able to make Ubuntu use the same keyboard shortcuts as OSX System Wide, for the following keyboard sequences only (ie I don't want to make Ctrl act like Super)

  • Super+C -> Copy

  • Super+V -> Paste

  • Super+T -> Open a new tab in whatever browser I'm in.

  • Super+W -> Close a tab in whatever browser I'm in.

So in short, is there anyway for me to map just these keyboard sequences to the following, system wide ?

  • Super+C -> Ctrl+C
  • Super+V -> Ctrl+V
  • Super+T -> Ctrl+T
  • Super+W -> Ctrl+W

I know there are ways for me to do this for vim, and Firefox, and I'm sure specifically for most applications… but I would prefer to have to do this just once and have it work that way system wide!

I'm using a standard PC keyboard, that is "Generic 105 key (intl) PC" on Ubuntu. I'm also using the same keyboard on my Mac mini.

Best Answer

If you install the xautomation package, you can add a command in System/Preferences/Keyboard Shortcuts/Custom like:

xte "keyup Meta_L" "keyup c" "keydown Control_L" "key c" "keyup Control_L"

and map that to Meta-C.


Alternative Solution:

Install AutoKey (apt-get install autokey-gtk) and set a phrase to:

Phrase Text: <ctrl>+C (actually type out the <ctrl>+ here)
Paste Using: Keyboard
Abbreviation: None
Hotkey: <super>+v
Window Filter: None
Related Question