Last active
February 23, 2023 01:19
-
-
Save gh640/034311ca10248d0f82db8aed12d3573b to your computer and use it in GitHub Desktop.
Karabiner-Elements configuration to change numbers with both shift keys if pressed with both shift keys
This file contains hidden or 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": "Both shifts + numbers => Keypad numbers", | |
"rules": [ | |
{ | |
"description": "Both shifts + 1 => Keypad 1", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "1", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_1" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 2 => Keypad 2", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "2", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_2" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 3 => Keypad 3", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
}, | |
"key_code": "3" | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_3" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 4 => Keypad 4", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "4", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_4" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 5 => Keypad 5", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "5", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_5" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 6 => Keypad 6", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "6", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_6" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 7 => Keypad 7", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "7", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_7" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 8 => Keypad 8", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "8", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_8" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 9 => Keypad 9", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "9", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_9" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Both shifts + 0 => Keypad 0", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "0", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"right_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"repeat": true, | |
"key_code": "keypad_0" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Environment
❯ sw_vers
ProductName: macOS
ProductVersion: 13.2
BuildVersion: 22D49
- Karabiner-Elements
14.11.0
The keyboard layout is expected to be ANSI.
Usage
Put this file both-shifts-keypad.json
into ~/.config/karabiner/assets/complex_modifications
.
Approach A) Import the setting via a link
url='https://gist.githubusercontent.com/gh640/034311ca10248d0f82db8aed12d3573b/raw/a08030db5cf47a5626be1ba63e79fdfb23956fd2/both-shifts-keypad.json'
open "karabiner://karabiner/assets/complex_modifications/import?url=${url}"
Approach B) Download and put the file manually
url='https://gist.githubusercontent.com/gh640/034311ca10248d0f82db8aed12d3573b/raw/a08030db5cf47a5626be1ba63e79fdfb23956fd2/both-shifts-keypad.json'
cd ~/.config/karabiner/assets/complex_modifications
http -d "${url}"
Open Karabiner-Elements Settings window and go to Complex Modifications
:
Click Add rule
:
Enable the rules:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference: