views:

801

answers:

5

Is there a way to map Cmd-C to Copy in linux? (instead of Ctrl-C)

Would be nice if I could also have the emacs style ones, like Ctrl-B to move left by one character.

A: 

You'll get almost all of the way there if you switch Cmd and Ctrl

Paul Betts
A: 

Not really.

If I swapped Cmd and Ctrl, then pressing Cmd-C would act as Ctrl-C, or copy.

However, pressing Ctrl-B, would act as Cmd-B which doesn't do anything (whereas pressing Ctrl-B on Mac OS X moves one character forward).

I might be able to use your solution though. Is there a way, on Linux/X, to map certain key combos to other key combos?

Then I will try to make a map (and of course post it here).

chris
+1  A: 

KDE 3 is probably the most flexible here; there's a pre-defined keyboard shortcut scheme named "Mac Scheme". You can set it through KControl Control Center > Regional & Accessibility > Keyboard Shortcuts or kcmshell keys and it will have effect on almost all KDE applications immediately. You might miss some of those Emacs-like "Ctrl-*" shortcuts that OS X has, but that aside, it works well (as long as your X modifiers are mapped correctly). And if it's not to your liking, it's easily customizable.

You can also set Control Center > Desktop > Behavior to enable a Mac OS-like menubar; all KDE applications will then share a menubar at the top of the screen instead of being individually attached to each window.

ephemient
Agreed - I've managed to get Konqueror and Konsole to behave much like Safari and Terminal, which makes me happy. I can even use alt-shift-Q to log out.
Nicholas Riley
+1  A: 

Is there a way, on Linux/X, to map certain key combos to other key combos?

In the tradition of all open source projects, there's not a way, there are several. At the lowest level you've got kernel keybindings, which is probably not what you want. At the X server level you've got xkb with its myriad utilities. And then it seems that every window manager - gnome, kde, xfce or other - also has a keymapping utility. xkb seems to have lots of utils and such around it, and is likely more complete than any random window manager's keymapping utils, so I'd look at that first.

pjz
A: 

xmodmap -e "keycode 63 = Control_L"

That way Cmd will be Control. No other keys will be swapped

Edited: I forgot the "-e"