Skip to content

Instantly share code, notes, and snippets.

@rangeoshun
Last active April 12, 2023 06:33
Show Gist options
  • Save rangeoshun/8db1a11145bf1601df2381fe8e9c1ebe to your computer and use it in GitHub Desktop.
Save rangeoshun/8db1a11145bf1601df2381fe8e9c1ebe to your computer and use it in GitHub Desktop.
Layers for the virtual modifiers `japanese_eisuu` and `japanese_kana` keys.
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": 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,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "Function layer for japanese_kana",
"manipulators": [
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 0
}
],
"from": {
"key_code": "japanese_kana"
},
"to": [
{
"set_variable": {
"name": "japanese_kana_modifier",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "japanese_kana_modifier",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "japanese_kana"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "a"
},
"to": [
{
"key_code": "home"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f"
},
"to": [
{
"key_code": "end"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "s"
},
"to": [
{
"key_code": "page_up"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "d"
},
"to": [
{
"key_code": "page_down"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j"
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k"
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l"
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "semicolon"
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i"
},
"to": [
{
"mouse_key": {
"x": -100,
"speed_multiplier": 20
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "o"
},
"to": [
{
"mouse_key": {
"y": -100,
"speed_multiplier": 20
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "p"
},
"to": [
{
"mouse_key": {
"y": 100,
"speed_multiplier": 20
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "open_bracket"
},
"to": [
{
"mouse_key": {
"x": 100,
"speed_multiplier": 20
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "0"
},
"to": [
{
"mouse_key": {
"vertical_wheel": -100,
"speed_multiplier": 20
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_kana_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "hyphen"
},
"to": [
{
"mouse_key": {
"vertical_wheel": 100,
"speed_multiplier": 20
}
}
],
"type": "basic"
}
]
},
{
"description": "Numpad layer for japanese_eisuu",
"manipulators": [
{
"from": {
"key_code": "japanese_eisuu"
},
"to": [
{
"set_variable": {
"name": "japanese_eisuu_modifier",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "japanese_eisuu_modifier",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "japanese_eisuu"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "japanese_kana"
},
"to": [
{
"key_code": "0"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "m"
},
"to": [
{
"key_code": "1"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "comma"
},
"to": [
{
"key_code": "2"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "period"
},
"to": [
{
"key_code": "3"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j"
},
"to": [
{
"key_code": "4"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k"
},
"to": [
{
"key_code": "5"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l"
},
"to": [
{
"key_code": "6"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "u"
},
"to": [
{
"key_code": "7"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i"
},
"to": [
{
"key_code": "8"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "japanese_eisuu_modifier",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "o"
},
"to": [
{
"key_code": "9"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 0,
"vendor_id": 0
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 0,
"vendor_id": 0
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"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": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"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": "fast_forward"
}
]
},
{
"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",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment