'How to remap "Context Menu" key in Mac OS X? [closed]

I have a Logitech keyboard (Ultra-Flat Keyboard Dark Shine to be exact), which has the context menu key in the middle of the windows and alt key, which is quite annoying.

Here's a screenshot of where the key is:

http://freshlog.com/grabs/ff532-How_do_I_remap_the_context_menu_key_in_Mac_OS_X

I can remap the windows and alt keys under the default Keyboard System Preferences Panel, but there doesn't seem to be a way to remap the context menu key.

Any ideas?



Solution 1:[1]

Use KeyRemap4MacBook (Karabiner for osx 10.9, 10.10). As Mecki pointed out, XML .keylayouts / Ukelele can't solve your problem.

In spite of the name, KeyRemap4MacBook works on any Mac (OS X 10.4 or later).

The settings you want are under "For PC Users" » "Change PC Application Key".

enter image description here

Solution 2:[2]

Use KeyRemap4Macbook. Edit private.xml file like this:

<item>
    <name>Change Windows context menu key to Right option key</name>
    <identifier>private.win_context_menu_option_key</identifier>
    <autogen>--KeyToKey-- KeyCode::PC_APPLICATION, KeyCode::OPTION_R</autogen>
</item>

This code will remap right option key to the context menu key.

Solution 3:[3]

You can use Karabiner to map App to Command+Option:

You can then use Keyboard Maestro to map Command+Option+Letter, where Letter is a key that denotes an application, to focus the application:

For example, you can then do App+C to focus Chrome, App+T to focus Terminal, App+S to focus Slack etc. (if an app isn't already open, Keyboard Maestro opens it first).

If you're using a generic keyboard, then you have a dedicated App key:

If you're using an Apple keyboard, you have to hold Command and Option, but they are next to each other, and appear on both sides of the spacebar:

Keep in mind that OS X already uses Command+Option+Esc to open the Force Quit Applications dialogue, so you could now use App+Esc for that. Likewise, OS X uses Command+Option+W to close all of the windows in the focus application (tabs in Chrome).

Notes:

  • Karabiner is an open source kernel extension for modifying the way keyboard input is handled by OS X.
  • Keyboard Maestro is a proprietary application for creating keyboard shortcuts in OS X. It has a free 30 day trial, and costs $36.

Solution 4:[4]

The latest MacOS versions are served by Karabiner Elements 12.1.
Key-to-key remapping are done in the Simple Modifications tab and conveniently selected in 2 rows of drop-down-menus (see: screenshot).

Complex Modifications in this Preferences Panel's tab have either to be added by importing them from the internet (Karabiner-E.'s site) or from the user's ~/.config/karabiner/assets/ complex_modifications folder.
"Complex" ones from the net actually are also copied there and switched "on" (= [+ Enable]) in the tab.

ALL modifications are finally stored (& thus "activated") in ~/.config/karabiner/karabiner.json.

A pragmatic procedure (that also helps avoid mistakes while writing complex-mods yourself) is to copy & rename & alter one "imported" mod.
Once you are experienced (e.g.: different bracket types) it may be easier to edit the json file directly…


(Inline graphic shows part of drop-down-menu)

There is no longer the option to constrict remaps to specific windows (can be simulated by an osascript AppleScript) as some other features.
A non-Element version of Karabiner is being developed.

Two sites to get information & questions (answered) – but please search for previous "doubles" !:

github.com >> Karabiner-Elements
groups.google.com/forums/ osx-karabiner

Solution 5:[5]

KeyRemap4MacBook

Entry: For PC Users -> Change PC Application Key -> Application Key to Option_L

Solution 6:[6]

Unfortunately the latest macOS Sierra doesn't support Karabiner yet. An easy solution is to convert capslock key with command key.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dnozay
Solution 2 j0k
Solution 3 Glorfindel
Solution 4 clemsam lang
Solution 5 calql8edkos
Solution 6 Tadashi Kikuno