Last active
April 13, 2023 04:01
-
-
Save jungin500/6025571ae9d61bb47050343e45c1fdd1 to your computer and use it in GitHub Desktop.
[Karabiner][V13] left_shift twice to toggle between Control <=> Command - https://dailylime.kr/898/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "[V13] left_shift twice to toggle between Control <=> Command", | |
"rules": [ | |
{ | |
"description": "Press left_shift twice to toggle between Control and Command key. Another key pressed during each left_shift press will be considered as a cancel, and timeout will also considered as cancel.", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 1 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_control", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command" | |
} | |
] | |
}, | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 3 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_control", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command" | |
} | |
] | |
}, | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 1 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_control" | |
} | |
] | |
}, | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 3 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_control" | |
} | |
] | |
}, | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 0 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift" | |
}, | |
"to": [ | |
{ | |
"key_code": "left_shift" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 2 | |
} | |
} | |
], | |
"to_delayed_action": { | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 0 | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 2 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift" | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 1 | |
} | |
} | |
] | |
}, | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 1 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift" | |
}, | |
"to": [ | |
{ | |
"key_code": "left_shift" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 3 | |
} | |
} | |
], | |
"to_delayed_action": { | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 1 | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift toggled", | |
"value": 3 | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift" | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 1 | |
} | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"set_variable": { | |
"name": "left_shift toggled", | |
"value": 0 | |
} | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
L7~L98
: Swaps Control <-> Command depends on variableL99~L228
: Toggles variable on key pressed twice