9

Through the day I work on both a Mac and Ubuntu.
What's the best option for mapping the Mac keyboard (an external, non-Mac one) to Ubuntu style keys - when using the Mac (OS X).

Basically I want to have:

Control on keyboard to trigger Command ⌘ keystroke on the Mac
Alt on keyboard to trigger Option ⌥ keystroke on the Mac
Windows on keyboard key to trigger Command ⌘ keystroke on the Mac

Aside from whether this is a good idea or not and which one I should pick, I am just posing the question of how to make the Mac, when used with the external keyboard, to be more Ubuntu-like. My biggest interest is in making sure that vi/vim/macvim and tmux, both of which have a large number of keyboard commands, work the same for my fingers.

I initially thought about this posting on Ask Ubuntu but it actually seems more suitable here.

11
  • How do you intend to trigger a <kbd>Control ⌃</kbd> keystroke on the Mac?
    – Cajunluke
    Jun 28, 2012 at 0:51
  • I don't understand your concern. Other than remapping the control/command/alt/etc (modifiers), what else is different in Ubuntu? I mean, Cmd+S(ave) is going to be Control+S(ave) on Ubuntu… which is the same. Control+Tab (cmd+tab Mac)… etc. Both OS's have similar shortcuts (which you can redefine under Mac anyway). <puzzled> I use vi on a Mac (and vim) and sometimes under Linux and they are exactly the same… Jun 28, 2012 at 0:54
  • 1
    Mac's not handy, I can check in a bit. Jun 28, 2012 at 1:00
  • 1
    I'd say that the "biggest" difference between LInux/Windows and Mac is the CMD key being the centerpiece (instead of Control), which you should swap. Option is Alt and Windows Key is Command. But There's no "Mac" key (like Windows Key) on Mac (or "Linux" key under Linux) so by swapping Cmd<->Control you're pretty much there. Instead of CMD+C to copy, you'd press Control-C (like LInux) and the OS will be doing a CMD+C. :) Other than that… I don't see a huge difference. Jun 28, 2012 at 1:01
  • 1
    @ephsmith That sounds good ! Jun 28, 2012 at 1:05

1 Answer 1

8

Ok, what you want to do is remap your modifiers:

Go to System Preferences and select Modifier Keys:

Preferences

Then swap Cmd and Control.

Modifiers

note: in the shot they are not swapped

For reference, I do this with an external Razer Blackwidow for Windows (I want it to be like my Mac keyboard because I've been using Mac keyboards for 10 years).

6
  • Yes this works well for me. I like the fact that I have the choice and am applying it to my external keyboards only so my colleagues are not freaked out when they use the mac keyboard temporarily ! Jul 9, 2012 at 2:10
  • What do you do when you have a VM which inherits those Modifier changes, so when you go do CTRL+C in your VM it does CMD+C?.. Sep 3, 2014 at 20:08
  • @GeorgeKatsanos I am not sure exactly what you mean, but the host OS determines what the action is. In the case of VMWare and Parallels, their drivers used to be "clever enough" to do the right thing (i.e.: cmd+C would do copy in the virtual OS too). But I haven't used either in a long time! Sep 3, 2014 at 22:36
  • I used the key modifier settings in OSX to swap command and control, this way I can do ctrl+c for copy etc (like windows)(habits), the result was that my ubuntu VM now sees my control function attached not to the control key but to the windows duper key (so basically the keys in ubuntu also swapped). Sep 4, 2014 at 5:22
  • I am quite close to switch to VMWare because its not the only issue I have with OSX and VirtualBox. The Retina screen also makes apparently the graphics slow and laggy. Sep 4, 2014 at 5:23

You must log in to answer this question.

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