On linux (Centos 7.1 to be specific) to effectively utilize Jetbrains’ products using an Apple keyboard with OS X hotkeys, the “F” keys need to be enabled and the command key (⌘) needs to be mapped to the “Meta” key code. Below are steps to do both of those things.
1. Enable the “F” keys.
$ sudo echo 0 > /sys/modules/hid_apple/parameters/fnmode
To make this change permanent, add the line above to
2. Map the command key (⌘) to “Meta” (in the context of your user account).
$ echo $’keycode 133 = Meta_L\nkeycode 134 = Meta_R’ > ~/applekeyfixkeyfix
$ /usr/bin/xmodmap ~/applekeyfix
To have these changes persist for my user account (not the whole system) you can use Centos’ GUI at Applications->System Tools->Startup Application.
Added a new item with the command field set to
3. Other Issues
Another issue I’ve run into is that the ⌘-A key, which is supposed “select all”, is overridden by a Centos default keymap. To fix this go into the “Keyboard” settings. Select the “Shortcuts” tab. From within the “Shortcuts” tab select “system”. There should be an entry called “Show all applications” with a value of “Super+A”. Disable this keymapping by selecting the it, and pressing the backspace key to clear/disable it.