

- HAMMERSPOON REMAP KEY HOW TO
- HAMMERSPOON REMAP KEY SOFTWARE
- HAMMERSPOON REMAP KEY PC
- HAMMERSPOON REMAP KEY MAC
Karabiner-Elements is a powerful and stable keyboard customizer for macOS. The content of the page might be outdated the basic thought is the same.ĭue to the “per app” restrictions not very usable.
HAMMERSPOON REMAP KEY HOW TO
Just after I finished part 2 I found Doug’s AppleScripts page on how to remap keys in AppleScript.

Now when you open a file-editor or any other text-input field using the key combination Control (⌃) + Option (⌥) + ‘x’ results in an exploding head emoji. * Use Control-Option-x to insert exploding-head emoji */ "^~x" = ( "insertText:", "🤯") * set coding to utf-8 to use Unicode characters */ /* Character | Meaning */ /* - | - */ /* ~ | Option key */ /* $ | Shift key */ /* ^ | Control key */ /* | Command key */ /* # | keys on number pad */ As an example you can add the following text: To play around with it you have to create the file ‘~/Library/KeyBindings/DefaultKeyBinding.dict’. By default the directory and file do not exist. The keybindings on macOS can be modified through the file ‘DefaultKeyBindings.dict’ in the directory ‘~/Library/KeyBindings’. This option does not enable you to swap the modifier keys, but does offer you a way to natively set keybindings on macOS. One-trick-pony, simple, clean and easy to implemement.Please ignore this for now, this is part of my personal configuration and described in the follow-up post.

In the image above the Caps Lock (⇪) Key is set to “No Action”.
HAMMERSPOON REMAP KEY PC
Select the PC keyboard from the dropdown menu at the top and swap the Option (⌥) and Command (⌘) keys. Go to your System Preferences and select the Keyboard. The tools are already available in macOS. OSXDaily has a nice page on remapping the keys. macOS: Remapping modifier keysīy far the easiest way to swap the behaviour of these two keys is already built into the operating system. In a follow-up post I will describe my personal setup. In this post I will write about the tools and native ways I encountered to customize my keyboard. I could have sticked to the simplest option and just change the modifier keys within macOS but I already played with remapping my Capslock (⇪) key to Escape (⎋) and read about the possibilities of using the Capslock (⇪) key as a “Hyper” key.
HAMMERSPOON REMAP KEY SOFTWARE
Looking at the possibilities of remapping the keys in software there are different ways with different options. At least the “Alt” key has some similarity with the “Option/Alt” (⌥) key. The Magicforce 68 is a mechanical keyboard with replaceable keycaps, swapping the physical keys was easy.
HAMMERSPOON REMAP KEY MAC
Without remapping the Windows key acts as a Mac Option/Alt (⌥) key and the PC Alt key acts as a Mac Command (⌘) key. When muscle memory kicks-in it results in unexpected behaviour. Functionally everything is there but at the wrong place on the keyboard.

Same for the Option (⌥) key on an Apple keyboard and the Alt key on PC keyboards, both send the same USB scancode. The Window (❖)- and Command (⌘) key both send the same USB scancode. Disadvantage, it has a PC layout and a combined Escape, grave accent and tilde key. A nice compact keyboard with proper arrow-keys. Recently I bought a mechanical keyboard, the Qisan Magicforce 68.
