The primary method for adding and removing context menu items from macOS's context menu is through services. The services appear under the “Services” dropdown in the right-click menu at the bottom of the menu. macOS offers a GUI-based method here for adding and removing context menu items.
Remapping Function Keys in System Preferences To remap individual function keys to do your bidding, visit System Preferences > Keyboard > Shortcuts. That's the same location for customizing keyboard shortcuts on macOS.
On your Mac, choose Apple menu > System Preferences, click Keyboard , then click Keyboard. Click Modifier Keys. For each modifier whose default action you want to change, click the pop-up menu, then choose the action you want performed when you press the key, or choose No Action.
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".
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.
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:
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…
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With