Skip to content

Instantly share code, notes, and snippets.

@tkrkt
Last active October 25, 2018 08:01
Show Gist options
  • Save tkrkt/5f76085a7c3d43373ea40f15a1107fbb to your computer and use it in GitHub Desktop.
Save tkrkt/5f76085a7c3d43373ea40f15a1107fbb to your computer and use it in GitHub Desktop.
keymap
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500
},
"rules": [
{
"description": "[my ergodox emulation] base (required to use other rules)",
"manipulators": [
{
"conditions": [
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "lang2"
},
"to": [
{
"set_variable": {
"name": "eisuu_pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "eisuu_pressed",
"value": 0
}
}
],
"type": "basic"
},
{
"conditions": [
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "lang1"
},
"to": [
{
"set_variable": {
"name": "kana_pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "kana_pressed",
"value": 0
}
}
],
"type": "basic"
}
]
},
{
"description": "[my ergodox emulation] eisuu cursor",
"manipulators": [
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "e"
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "s"
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "d"
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "f"
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "w"
},
"to": [
{
"key_code": "page_up"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "r"
},
"to": [
{
"key_code": "page_down"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "a"
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "g"
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"command"
]
}
],
"type": "basic"
}
]
},
{
"description": "[my ergodox emulation] kana shift+cursor",
"manipulators": [
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "e"
},
"to": [
{
"key_code": "up_arrow",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "s"
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "d"
},
"to": [
{
"key_code": "down_arrow",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "f"
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "w"
},
"to": [
{
"key_code": "page_up",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "r"
},
"to": [
{
"key_code": "page_down",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "a"
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"command",
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "g"
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"command",
"shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "[my ergodox emulation] kana edit",
"manipulators": [
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "j"
},
"to": [
{
"key_code": "delete_or_backspace"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "k"
},
"to": [
{
"key_code": "return_or_enter"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "l"
},
"to": [
{
"key_code": "delete_forward"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "h"
},
"to": [
{
"key_code": "j",
"modifiers": [
"shift",
"control"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "kana_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "n"
},
"to": [
{
"key_code": "semicolon",
"modifiers": [
"shift",
"control"
]
}
],
"type": "basic"
}
]
},
{
"description": "[my ergodox emulation] eisuu phone numpad",
"manipulators": [
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "u"
},
"to": [
{
"key_code": "1"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "i"
},
"to": [
{
"key_code": "2"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "o"
},
"to": [
{
"key_code": "3"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "j"
},
"to": [
{
"key_code": "4"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "k"
},
"to": [
{
"key_code": "5"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "l"
},
"to": [
{
"key_code": "6"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "m"
},
"to": [
{
"key_code": "7"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "comma"
},
"to": [
{
"key_code": "8"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "period"
},
"to": [
{
"key_code": "9"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "slash"
},
"to": [
{
"key_code": "0"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "eisuu_pressed",
"type": "variable_if",
"value": 1
},
{
"keyboard_types": [
"jis"
],
"type": "keyboard_type_if"
}
],
"from": {
"key_code": "semicolon"
},
"to": [
{
"key_code": "0"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 4871,
"vendor_id": 65261
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": [
{
"from": {
"key_code": "f15"
},
"to": {
"key_code": "japanese_kana"
}
},
{
"from": {
"key_code": "f16"
},
"to": {
"key_code": "japanese_eisuu"
}
}
]
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 630,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [
{
"from": {
"key_code": "left_command"
},
"to": {
"key_code": "left_control"
}
},
{
"from": {
"key_code": "left_control"
},
"to": {
"key_code": "left_command"
}
}
]
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 50475,
"vendor_id": 1133
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": []
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": {
"consumer_key_code": "display_brightness_decrement"
}
},
{
"from": {
"key_code": "f2"
},
"to": {
"consumer_key_code": "display_brightness_increment"
}
},
{
"from": {
"key_code": "f3"
},
"to": {
"key_code": "mission_control"
}
},
{
"from": {
"key_code": "f4"
},
"to": {
"key_code": "launchpad"
}
},
{
"from": {
"key_code": "f5"
},
"to": {
"key_code": "illumination_decrement"
}
},
{
"from": {
"key_code": "f6"
},
"to": {
"key_code": "illumination_increment"
}
},
{
"from": {
"key_code": "f7"
},
"to": {
"consumer_key_code": "rewind"
}
},
{
"from": {
"key_code": "f8"
},
"to": {
"consumer_key_code": "play_or_pause"
}
},
{
"from": {
"key_code": "f9"
},
"to": {
"consumer_key_code": "fastforward"
}
},
{
"from": {
"key_code": "f10"
},
"to": {
"consumer_key_code": "mute"
}
},
{
"from": {
"key_code": "f11"
},
"to": {
"consumer_key_code": "volume_decrement"
}
},
{
"from": {
"key_code": "f12"
},
"to": {
"consumer_key_code": "volume_increment"
}
}
],
"name": "Default profile",
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment