Skip to content

Instantly share code, notes, and snippets.

@jvmvik
Created February 1, 2023 02:51
Show Gist options
  • Save jvmvik/c1473773492a9d318e66460af1892e4a to your computer and use it in GitHub Desktop.
Save jvmvik/c1473773492a9d318e66460af1892e4a to your computer and use it in GitHub Desktop.
Mac secondary keyboard to execute shortcut only
// after trying to build my own shortcut keyboard with arduino.
// I realize that it would be time and cost effective to re-use a spare mechanical keyboard to execute my shortcut.
// Karabiner offers a simple easy solution even it's a bit of twist.
//
// source: https://stackoverflow.com/questions/63194740/karabiner-elements-map-a-key-to-a-combination-keys
//
// edit: ~/.config/karabiner/karabiner.json
//
// Remap the secondary keyboard key d to command + d -> duplicate line in the VS code command palette
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 36,
"vendor_id": 1241
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [
{
"from": {
"key_code": "d"
},
"to": [
{
"key_code": "d",
"modifiers": "command"
}
]
}
],
"treat_as_built_in_keyboard": false
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment