Skip to content

Instantly share code, notes, and snippets.

@rguruprakash
Last active February 12, 2023 11:38
Show Gist options
  • Save rguruprakash/7064be1330cea67d2db7be77b2b0d347 to your computer and use it in GitHub Desktop.
Save rguruprakash/7064be1330cea67d2db7be77b2b0d347 to your computer and use it in GitHub Desktop.
{
"title": "Caps Lock to Hyper Key (Command-Ctrl)",
"rules": [
{
"description": "Hyper Key: map Caps Lock to Command-Ctrl (Escape if alone)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command",
"modifiers": [
"left_control"
]
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"description": "Hyper Key: map Command-Ctrl + h/j/k/l to Arrow Keys",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"left_command",
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"left_command",
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"left_command",
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"left_command",
"left_control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment