Skip to content

Instantly share code, notes, and snippets.

@mping
Last active January 18, 2019 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mping/27d83150743910508c6ce153b4def3e8 to your computer and use it in GitHub Desktop.
Save mping/27d83150743910508c6ce153b4def3e8 to your computer and use it in GitHub Desktop.
karabiner://karabiner/assets/complex_modifications/import?url=file:/Users/mping/Devel/workspace/capslock_ijkl_fn.json
{
"title": "Caps Lock (Fn) + IJKL",
"rules": [
{ "description": "Caps Lock to fn",
"manipulators": [{"type": "basic", "from": {"key_code": "caps_lock", "modifiers": {"optional": ["any"]}}, "to": [{"key_code": "fn"}]}] },
{ "description": "Fn + I/J/K/L to Arrow Keys",
"manipulators": [{"type": "basic", "from": {"key_code": "i", "modifiers": {"mandatory": ["fn"], "optional": ["any"]}}, "to": [{"key_code": "up_arrow"}] },
{"type": "basic", "from": {"key_code": "j", "modifiers": {"mandatory": ["fn"], "optional": ["any"]}}, "to": [{"key_code": "left_arrow"}]},
{"type": "basic", "from": {"key_code": "k", "modifiers": {"mandatory": ["fn"], "optional": ["any"]}}, "to": [{"key_code": "down_arrow"}]},
{"type": "basic", "from": {"key_code": "l", "modifiers": {"mandatory": ["fn"], "optional": ["any"]}}, "to": [{"key_code": "right_arrow"}]}] },
{ "description": "Fn + H to Delete",
"manipulators": [{"type": "basic", "from": {"key_code": "h", "modifiers": {"mandatory": ["fn"], "optional": ["any"]}}, "to": [{"key_code": "delete_or_backspace"}]}] },
{ "description": "Disable arrows",
"manipulators": [{"type": "basic", "from": {"key_code": "left_arrow"}, "to": [{"key_code": "vk_none"}]},
{"type": "basic", "from": {"key_code": "right_arrow"}, "to": [{"key_code": "vk_none"}]},
{"type": "basic", "from": {"key_code": "up_arrow"}, "to": [{"key_code": "vk_none"}]},
{"type": "basic", "from": {"key_code": "down_arrow"}, "to": [{"key_code": "vk_none"}]}] },
{ "description": "Disable Delete",
"manipulators": [{"type": "basic", "from": {"key_code": "delete_or_backspace"}, "to": [{"key_code": "vk_none"}]}] }
]
}
@mping
Copy link
Author

mping commented Jan 18, 2019

On Karabiner/Complex Modifications/Parameters, make sure to set to_if_held_down_threshold_milliseconds to a value high enough otherwise, long press on Caps Lock will eventually revert to normal behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment