Skip to content

Instantly share code, notes, and snippets.

@exoego
Created August 17, 2023 03:09
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 exoego/d4d5395baabb840a4aca7dcedad67778 to your computer and use it in GitHub Desktop.
Save exoego/d4d5395baabb840a4aca7dcedad67778 to your computer and use it in GitHub Desktop.
Karabiner-elements long press (long hold) example
1. Put this file `~/.config/karabiner/assets/complex_modifications` and edit
2. Open Karabiner-Elements settings
3. Open "Complex Modifications"
4. Click "Add rule"
5. Enable "Demo > Control + R long press"
6. Test it (Hold `Control + R`)
{
"title": "Demo",
"rules": [
{
"description": "Control + R long press",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "r",
"modifiers": {
"mandatory": [
"control"
]
}
},
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 2000,
"basic.to_if_held_down_threshold_milliseconds": 2000
},
"to_if_alone": [
{
"key_code": "r"
}
],
"to_if_held_down": [
{
"shell_command": "open -a 'terminal.app'"
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment