Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Windows key the IntelliJ IDEA Command/Meta key under Windows?

I'm using IntelliJ IDEA 14 under OS X, Windows and Ubuntu for several months, found that the keymap Mac OS X 10.5+ is more suitable for me and want to keep same experience under all platforms.

OS X has five modifier keys: Shift, Caps Lock, Control, Option, and Command, while Windows/Ubuntu has only four: Shift, Caps Lock, Control and Alt. If I want to use Mac OS X 10.5 keymap under Windows/Ubuntu, then I need map a key to Command key which plays a great role.

Under Ubuntu I remapped Windows key to Meta key using xmodmap, but I could not find how to do it under Windows. I've tried key remappers such as SharpKeys, but none of them can remap keys to Command/Meta key. So is there a way to do it?

like image 742
zhaown Avatar asked Oct 03 '15 11:10

zhaown


People also ask

How do I use the meta key in Windows?

By default, the key labeled Alt is mapped as the Meta key. If you wish it to produce the Alt modifier instead, set the variable w32-alt-is-meta to a nil value. MS-Windows reserves certain key combinations, such as Alt-TAB and a number of Windows key combinations, for its own use.

What is the meta key on a Windows keyboard?

The meta key is a key on some keyboards, normally located next to the spacebar, that performs special functions when combined with another key. It originated on keyboards for Lisp computers in the 1960s, and its use continued on Sun computers where the key was marked with a diamond shape.

What is meta key in Mac?

What is the Meta Key ? The Meta Key (denoted as M or Meta ) is a modifier key which mean it temporarily modify the normal action of another key when pressed together. Common modifier keys are shift , alt , or control .


1 Answers

Here's a workaround that works partly. In IDEA do the following:

  1. Help -> Edit Custom Properties...
    • In the file that opens, add this on a new line: keymap.windows.as.meta=true
  2. Choose your Mac keymap under File -> Settings... -> Keymap. For example, "Mac OS X 10.5+".

If you use a Windows keyboard and you want the same layout as with your Mac keyboard you can remap

  • the left Windows key to become the left Alt key and
  • the left Alt to become the left Windows key, that would then be interpreted as the Mac's Command (Cmd/Meta) key.

To do so, you could install AutoHotkey and run it with the following script, by putting these two lines in a .ahk file:

LAlt::LWin LWin::LAlt 

To read more about the problem(s) with both the Windows key and this workaround see the comments of IDEA-144702.

like image 155
seven Avatar answered Sep 20 '22 15:09

seven