Skip to content

Instantly share code, notes, and snippets.

@gh640
Last active February 23, 2023 01:22
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 gh640/272b3b479418b27f1f290058fe0395b5 to your computer and use it in GitHub Desktop.
Save gh640/272b3b479418b27f1f290058fe0395b5 to your computer and use it in GitHub Desktop.
Karabiner-Elements configuration to change sign keys to numpad sign keys if pressed with both shift keys
{
"title": "Both shifts + signs => Keypad signs",
"rules": [
{
"description": "Both shifts + - => Keypad -",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "hyphen",
"modifiers": {
"mandatory": [
"left_shift",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "keypad_hyphen"
}
]
}
]
},
{
"description": "Both shifts + = => Keypad +",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "equal_sign",
"modifiers": {
"mandatory": [
"left_shift",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "keypad_plus"
}
]
}
]
},
{
"description": "Both shifts + . => Keypad .",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "period",
"modifiers": {
"mandatory": [
"left_shift",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "keypad_period"
}
]
}
]
},
{
"description": "Both shifts + / => Keypad /",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "slash",
"modifiers": {
"mandatory": [
"left_shift",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "keypad_slash"
}
]
}
]
}
]
}
@gh640
Copy link
Author

gh640 commented Feb 23, 2023

Environment

❯ sw_vers
ProductName:		macOS
ProductVersion:		13.2.1
BuildVersion:		22D68
  • Karabiner-Elements 14.11.0

The keyboard layout is expected to be ANSI.

@gh640
Copy link
Author

gh640 commented Feb 23, 2023

Installation

Approach A) Import with link

url='https://gist.githubusercontent.com/gh640/272b3b479418b27f1f290058fe0395b5/raw/f9b6aa0302aa69638d2635fbc581d6be729f01d1/both-shifts-keypad-2.json'
open 'karabiner://karabiner/assets/complex_modifications/import?url=${url}'

Approach B) Download and put the file manually

url='https://gist.githubusercontent.com/gh640/272b3b479418b27f1f290058fe0395b5/raw/f9b6aa0302aa69638d2635fbc581d6be729f01d1/both-shifts-keypad-2.json'
cd ~/.config/karabiner/assets/complex_modifications
http -d "${url}"

See also:

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