How to remap any key to any key on your OSX keyboard

This is a somewhat technical post about how to remap keys in OSX using Karabiner Elements.

Get karabiner elements (

Give it the permissions it needs via System Preferences

Use the built in options, or of you need a more complex modification…

Go to your user folder and find the directory: ~/.config/karabiner/assets/complex_modifications

Create a file there called ‘mapXtoY.json’ and in that file paste this:

{ "title": "Remap x to y", "rules": [ { "description": "Remap x to y", "manipulators": [ { "from": { "key_code": "x" }, "to": [ { "key_code": "y" } ], "type": "basic" } ] } ] }

Use Karibiner – Event Viewer to find the keycodes you need to substitute for x and y

(This is from here:

Here’s an example to map F13 to Shift-Control-Option + 4

{ "title": "Remap x to y", "rules": [{
"description": "F14 to s-c-o + 4",
"manipulators": [
"from": {
"key_code": "f14"
"to": [
"key_code": "4",
"modifiers": [
"type": "basic"
}] }


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.