23

I use WebStorm on both my Mac and Windows for work purposes. I would like to know if it is possible to use the MAC OSX keymap on Windows.

On windows if you load the MAC OSX keymap the mappings don't seem to line up correctly. For instance I see the character Meta being used, however Windows doesn't seem to properly map that character.

I also would like to note I am using a Mac keyboard on the Windows PC.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Ryan Watts
  • 611
  • 1
  • 9
  • 27

3 Answers3

21

How does Cmd (Meta) key map to your Windows keys?

You can get the full Mac keymap XML file and replace meta with whatever key it is on Windows. Some keys may not work or you may get conflicting mappings.

There is no easy and straightforward way that will work out of the box.

On Mac keymap is using Alt, Ctrl, Meta and Shift modifiers. This cannot be directly mapped to only 3 modifiers you have on Windows (Alt, Ctrl, Shift). You can't use Win as the modifier by default.

Also, a lot of the combinations with Win would be already taken by the OS (and the only way to disable these default mappings is via registry modification).

You are welcome to give it a try as there is a workaround to make Win work as a modifier in IntelliJ IDEA.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • Thank you, where do I add the .xml file on windows once I have created the mapping. – Ryan Watts Feb 23 '17 at 18:30
  • 1
    The file is placed in [CONFIG](https://intellij-support.jetbrains.com/hc/articles/206544519)`/keymaps` directory. Make sure IDE is not running at this moment. – CrazyCoder Feb 23 '17 at 18:39
  • 2
    Wouldn't it make sense to create another mapping template that works for standard Windows keyboards? (so that mappings are similar to Mac) I suggest to use Caps Lock for the extra Mac key (Command or Control). Caps Lock is a key that people seldom use anyway. The current templates simply don't function for this use case (Mac mapping on Windows keyboard), and I think it's an important use case. – Stan Aug 10 '19 at 10:33
  • I have a mac keyboard and a Windows machine, how do I go about using mac shortcuts on a Windows machine? – Parag Kadam Aug 01 '21 at 10:34
  • 1
    @CrazyCoder thank you for the answer. Can IntelliJ just introduce a keymap for macOS that will not use Meta/CMD? To make it similar to Windows/Linux – Vadim Jan 21 '22 at 14:49
  • 2
    Why keymap differs so much? One thing - META keys, but another - keymaps. For example: Refactor this — Ctrl + Alt + Shift +T vs Ctrl + T, or Select next occurrence — Alt + J vs Ctrl + G – Alex Jan 31 '22 at 17:59
  • 3
    If Windows has fewer modifiers would it not make sense to bring the windows keymaps over to Mac instead? – Brad Mar 31 '22 at 03:28
5

There is a third party plugin by samvtrran that solve that: macOS For All

Here is the plugin description:

A keymap for Windows and Linux (and macOS if you really want!) that rebinds common macOS 10.5+ shortcuts to non-Command keys. Some shortcuts aren't 1:1 replacements of modifier keys, so please check the key updates table.

If you notice any conflicting shortcuts or have a suggestion for a new keybinding, please open an issue on GitHub.

moppag
  • 956
  • 9
  • 17
4

On Windows go to file > settings > keymap and in the keymaps dropdown select default and the meta (aka cmd) key will be replaced by ctrl.

sanjsanj
  • 1,003
  • 9
  • 20