diff --git a/.bin/karabiner-keymap-hud b/.bin/karabiner-keymap-hud index 34cf0fa..33222b1 100755 --- a/.bin/karabiner-keymap-hud +++ b/.bin/karabiner-keymap-hud @@ -14,16 +14,21 @@ readonly CMD_FILE="$STATE_DIR/command" readonly LOG_FILE="$STATE_DIR/hud.log" readonly HIDUTIL="${KARABINER_HUD_HIDUTIL:-/usr/bin/hidutil}" readonly BATTERY_SWIFT="${KARABINER_TORABO_BATTERY_SWIFT:-$DOTFILES_DIR/.config/karabiner/scripts/torabo-battery.swift}" +readonly BATTERY_PLIST="${KARABINER_TORABO_BATTERY_PLIST:-$DOTFILES_DIR/.config/karabiner/scripts/torabo-battery-Info.plist}" readonly BATTERY_BIN="$STATE_DIR/torabo-battery" readonly BATTERY_JSON="$STATE_DIR/torabo-battery.json" readonly BATTERY_LOCK="$STATE_DIR/torabo-battery.lock" usage() { cat <<'USAGE' -Usage: karabiner-keymap-hud show|hide|status|start|stop +Usage: karabiner-keymap-hud show [jis|external|torabo] | hide | status | start | stop f + b で使用するキー一覧を表示または非表示にします。 -Torabo 接続時は直近の電池残量も見出しに出します。 + show … Torabo 接続中なら Torabo、なければ内蔵 JIS + show jis … 常に内蔵 JIS(上・外側ずらし) + show external … 常に外付けキーボードの従来配列 + show torabo … 常に Torabo-tsuki +Torabo 表示時は直近の電池残量も見出しに出します。 USAGE } @@ -71,34 +76,62 @@ start_daemon() { } } +# Bluetooth 利用説明をバイナリに埋め込み、Karabiner 経由でも権限ダイアログを出せるようにする。 +compile_battery_bin() { + local binary_tmp="$1" + # PATH 上の swiftc/codesign を使い、テストのスタブ差し替えにも対応する。 + swiftc -module-cache-path "$STATE_DIR/swift-cache" -O "$BATTERY_SWIFT" -o "$binary_tmp" \ + -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker "$BATTERY_PLIST" || return 1 + # 安定した識別子で署名し、Privacy の Bluetooth 一覧に残りやすくする。 + codesign --force --sign - --identifier jp.k-mass.torabo-battery "$binary_tmp" || return 1 +} + # ビルドと取得を別プロセスで行い、取得結果を一度に置き換える。 +# 失敗時は直近の成功結果を残し、Abort(権限不足)でも表示が空に戻らないようにする。 refresh_battery_async() { ( mkdir "$BATTERY_LOCK" 2>/dev/null || exit 0 local binary_tmp="" output_tmp="" trap 'rm -f -- "$binary_tmp" "$output_tmp"; rmdir "$BATTERY_LOCK"' EXIT trap 'exit 1' HUP INT TERM - [[ -f "$BATTERY_SWIFT" ]] || exit 0 - if [[ ! -x "$BATTERY_BIN" || "$BATTERY_SWIFT" -nt "$BATTERY_BIN" ]]; then + [[ -f "$BATTERY_SWIFT" && -f "$BATTERY_PLIST" ]] || exit 0 + if [[ ! -x "$BATTERY_BIN" || "$BATTERY_SWIFT" -nt "$BATTERY_BIN" || "$BATTERY_PLIST" -nt "$BATTERY_BIN" ]]; then binary_tmp="$(mktemp "$STATE_DIR/torabo-battery-bin.XXXXXX")" || exit 1 - /usr/bin/swiftc -module-cache-path "$STATE_DIR/swift-cache" -O "$BATTERY_SWIFT" -o "$binary_tmp" || exit 1 + compile_battery_bin "$binary_tmp" || exit 1 mv -f "$binary_tmp" "$BATTERY_BIN" || exit 1 + binary_tmp="" fi output_tmp="$(mktemp "$STATE_DIR/torabo-battery-data.XXXXXX")" || exit 1 - if "$BATTERY_BIN" >"$output_tmp"; then + if "$BATTERY_BIN" >"$output_tmp" 2>>"$LOG_FILE"; then mv -f "$output_tmp" "$BATTERY_JSON" + output_tmp="" else - rm -f "$BATTERY_JSON" + printf '[battery] read failed (exit %s); keeping previous cache if any\n' "$?" >>"$LOG_FILE" fi ) >"$LOG_FILE" 2>&1 & disown || true } show_hud() { + local mode="${1:-auto}" start_daemon + + case "$mode" in + jis) + # 常駐デーモンは show / show torabo を見る。JIS強制は show を書く。 + printf 'show\n' >"$CMD_FILE" + return + ;; + external) + printf 'show external\n' >"$CMD_FILE" + return + ;; + esac + + # 自動選択でToraboが見つからないときは内蔵JISを表示する。 local connection connection="$(torabo_connection)" || connection="" - if [[ -z "$connection" ]]; then + if [[ "$mode" == auto && -z "$connection" ]]; then printf 'show\n' >"$CMD_FILE" return fi @@ -155,7 +188,16 @@ status_hud() { main() { case "${1:-}" in - show) show_hud ;; + show) + case "${2:-}" in + "") show_hud auto ;; + jis|external|torabo) show_hud "$2" ;; + *) + usage >&2 + exit 1 + ;; + esac + ;; hide) hide_hud ;; start) start_daemon ;; stop) stop_daemon ;; diff --git a/.config/karabiner/assets/complex_modifications/f_hjkl_arrows.json b/.config/karabiner/assets/complex_modifications/f_hjkl_arrows.json index 6af9d25..76626da 100644 --- a/.config/karabiner/assets/complex_modifications/f_hjkl_arrows.json +++ b/.config/karabiner/assets/complex_modifications/f_hjkl_arrows.json @@ -28,7 +28,7 @@ ], "to": [ { - "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show'" + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show torabo'" } ], "to_after_key_up": [ @@ -621,7 +621,10142 @@ ] }, { - "description": "Torabo 以外で右 Shift の左隣のキーをハイフンにする", + "description": "Mac内蔵JIS専用 f layer (=Torabo L2); hjkl arrows; q Esc; e/u ⌫; p ⌦; a/s Tab; d ⌘; f+n=ABC f+m=あいう; f+b=HUD; 英数 tap=Enter hold=⌘; space hold=Shift [hold=e]", + "manipulators": [ + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "f" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "any", + "to_after_key_up": [ + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud hide'" + } + ] + }, + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show jis'" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 350 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "f", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show jis'" + } + ], + "to_after_key_up": [ + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud hide'" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "down_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "up_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "tab" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command" + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "eisuu_cmd", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_cmd_layer", + "value": true, + "key_up_value": false + } + }, + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "f", + "modifiers": [ + "left_command" + ] + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "eisuu_cmd", + "value": true + } + ], + "from": { + "key_code": "e", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_cmd_layer", + "value": true, + "key_up_value": false + } + }, + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "f", + "modifiers": [ + "left_command" + ] + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "down_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "up_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + }, + { + "type": "variable_if", + "name": "space_shift", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + }, + { + "type": "variable_if", + "name": "eisuu_cmd", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command" + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command" + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "down_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "up_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "right_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "delete_or_backspace" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "down_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "up_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "delete_or_backspace" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "tab" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "tab" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "1" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "escape" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "1", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "escape" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "delete_or_backspace" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "delete_or_backspace" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "q" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "tab" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "q", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "w" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_command" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "w", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_command" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "delete_forward" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "delete_forward" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "spacebar", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "space_shift", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_shift" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "spacebar", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "space_shift", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_shift", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "spacebar" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "japanese_eisuu" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "japanese_kana" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "japanese_eisuu" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "japanese_kana" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "japanese_eisuu", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "eisuu_cmd", + "value": true, + "key_up_value": false + } + }, + { + "set_variable": { + "name": "f_cmd_layer", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_command" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "from": { + "key_code": "japanese_eisuu", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "eisuu_cmd", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_command" + } + ], + "to_if_alone": [ + { + "key_code": "return_or_enter" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "from": { + "key_code": "japanese_kana", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "space_shift", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_shift", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "spacebar" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "from": { + "key_code": "right_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "eisuu_cmd", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "right_command", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "return_or_enter" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "f" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 d layer: n m , j k l u i o p → 1-0 number pad [hold=w]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "d" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "1" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "1" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "2" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "2" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "3" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "3" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "4" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "4" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "5" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "5" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "6" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "6" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "7" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "7" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "8" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "8" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "9" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "9" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "0" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "0" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 v layer: punctuation + h→~ + y→¥ [hold=d]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "v" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "comma" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "comma" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "period" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "period" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "slash" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "slash" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "semicolon" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "semicolon" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "quote" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "quote" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "backslash" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "backslash" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "hyphen" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "hyphen" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "equal_sign" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "equal_sign" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "open_bracket" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "open_bracket" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "close_bracket" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "close_bracket" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "grave_accent_and_tilde", + "modifiers": [ + "left_shift" + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "grave_accent_and_tilde", + "modifiers": [ + "left_shift" + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "0" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "international3" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "international3" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 c layer (=Torabo L5): macOS の設定に合わせて F1–F12 を標準ファンクションキーとして送る [hold=s]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "c" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "0" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f12", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f12", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f12", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f12", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f7", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f7", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f7", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f7", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f8", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f8", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f8", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f8", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f9", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f9", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f9", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f9", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f11", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f11", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f11", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f11", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f4", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f4", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f4", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f4", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f5", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f5", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f5", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f5", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f6", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f6", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f6", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f6", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f10", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f10", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f10", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f10", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f1", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f1", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f1", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f1", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f2", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f2", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f2", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f2", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f3", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f3", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f3", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f3", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 x layer (=Torabo L9): 音量・再生・輝度・Launchpad / Mission Control [hold=a]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "x" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "0" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "volume_increment" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "volume_increment" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "rewind" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "rewind" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "play_or_pause" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "play_or_pause" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "fast_forward" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "fast_forward" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "volume_decrement" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "volume_decrement" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "launchpad" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "launchpad" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_decrement" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_decrement" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_increment" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_increment" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "mute" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "mute" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_decrement" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_decrement" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_increment" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_increment" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "mission_control" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "mission_control" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 Mac JIS 上・外側ずらし(Torabo除外)。物理→出力 / 出力なし / cmd→opt", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "1", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "q" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "2", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "w" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "e" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "4", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "r" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "5", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "t" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "6", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "7", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "8", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "9", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "y" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "u" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "i" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "o" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "q", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "s" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "r", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "g" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "t", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "y", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "u", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "i", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "h" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "j" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "k" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "l" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "b" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "g", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "h", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "j", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "k", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "n" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "m" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "slash" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "z", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "x", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "c", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "v", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "b", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "n", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "m", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "comma", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "period", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "slash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "a" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "p" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "international1", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_option" + } + ], + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_option", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "right_option", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "f" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "d" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "v" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "c" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "x" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 control tap=z hold=Control(Toraboの z/⌃ を control へ移す)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "left_control", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "z_ctrl", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_control", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "z" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + } + ] + }, + { + "description": "外付けキーボード(従来配列) Torabo 以外で右 Shift の左隣のキーをハイフンにする", "manipulators": [ { "type": "basic", @@ -646,6 +10781,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -654,7 +10793,7 @@ ] }, { - "description": "f layer (=Torabo L2); hjkl arrows; q Esc; e/u ⌫; p ⌦; a/s Tab; d ⌘; f+n=ABC f+m=あいう; f+b=HUD; 英数 tap=Enter hold=⌘; space hold=Shift", + "description": "外付けキーボード(従来配列) f layer (=Torabo L2); hjkl arrows; q Esc; e/u ⌫; p ⌦; a/s Tab; d ⌘; f+n=ABC f+m=あいう; f+b=HUD; 英数 tap=Enter hold=⌘; space hold=Shift", "manipulators": [ { "type": "basic", @@ -672,14 +10811,14 @@ "to": [ { "set_variable": { - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true, "key_up_value": false } }, { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -704,6 +10843,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -719,12 +10862,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true } ], @@ -739,14 +10886,14 @@ "to": [ { "set_variable": { - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true, "key_up_value": false } }, { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -774,12 +10921,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -807,12 +10958,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -840,12 +10995,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -873,12 +11032,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -906,17 +11069,21 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true }, { "type": "variable_if", - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true } ], @@ -947,17 +11114,21 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true }, { "type": "variable_if", - "name": "space_shift", + "name": "external_space_shift", "value": true } ], @@ -989,12 +11160,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -1055,6 +11230,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1100,6 +11279,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1145,6 +11328,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1190,6 +11377,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1235,12 +11426,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true } ] @@ -1258,7 +11453,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1280,6 +11475,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1309,7 +11508,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1329,6 +11528,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1358,7 +11561,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1378,6 +11581,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1407,7 +11614,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1427,6 +11634,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1456,7 +11667,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1476,6 +11687,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1505,7 +11720,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1525,6 +11740,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1540,12 +11759,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1573,12 +11796,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1606,12 +11833,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1639,12 +11870,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1672,12 +11907,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1719,7 +11958,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1739,6 +11978,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1754,12 +11997,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1801,7 +12048,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1821,6 +12068,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1836,12 +12087,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1883,7 +12138,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1903,6 +12158,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1918,12 +12177,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1965,7 +12228,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1985,6 +12248,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2000,12 +12267,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2047,7 +12318,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2067,6 +12338,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2082,12 +12357,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2129,7 +12408,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2149,6 +12428,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2164,12 +12447,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2197,12 +12484,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -2217,7 +12508,7 @@ "to": [ { "set_variable": { - "name": "space_shift", + "name": "external_space_shift", "value": true, "key_up_value": false } @@ -2240,7 +12531,7 @@ "to": [ { "set_variable": { - "name": "space_shift", + "name": "external_space_shift", "value": true, "key_up_value": false } @@ -2266,6 +12557,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2295,7 +12590,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2315,6 +12610,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2344,7 +12643,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2364,6 +12663,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2379,12 +12682,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2412,12 +12719,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2445,12 +12756,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2465,14 +12780,14 @@ "to": [ { "set_variable": { - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true, "key_up_value": false } }, { "set_variable": { - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true, "key_up_value": false } @@ -2492,6 +12807,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2507,7 +12826,7 @@ "to": [ { "set_variable": { - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true, "key_up_value": false } @@ -2535,6 +12854,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2590,13 +12913,13 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } }, { - "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show'" + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show external'" } ], "parameters": { @@ -2610,6 +12933,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2625,12 +12952,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2644,7 +12975,7 @@ }, "to": [ { - "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show'" + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show external'" } ], "to_after_key_up": [ @@ -2656,7 +12987,7 @@ ] }, { - "description": "d layer: n m , j k l u i o p → 1-0 number pad", + "description": "外付けキーボード(従来配列) d layer: n m , j k l u i o p → 1-0 number pad", "manipulators": [ { "type": "basic", @@ -2672,7 +13003,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2694,12 +13025,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2729,7 +13064,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2749,12 +13084,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2769,12 +13108,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -2817,7 +13160,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2837,12 +13180,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2857,12 +13204,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -2905,7 +13256,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2925,12 +13276,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2945,12 +13300,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -2993,7 +13352,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3013,12 +13372,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3033,12 +13396,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3081,7 +13448,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3101,12 +13468,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3121,12 +13492,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3169,7 +13544,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3189,12 +13564,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3209,12 +13588,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3257,7 +13640,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3277,12 +13660,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3297,12 +13684,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3345,7 +13736,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3365,12 +13756,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3385,12 +13780,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3433,7 +13832,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3453,12 +13852,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3473,12 +13876,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3521,7 +13928,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3541,12 +13948,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3561,12 +13972,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3587,7 +14002,7 @@ ] }, { - "description": "v layer: punctuation + h→~ + y→¥", + "description": "外付けキーボード(従来配列) v layer: punctuation + h→~ + y→¥", "manipulators": [ { "type": "basic", @@ -3603,7 +14018,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3625,12 +14040,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3660,7 +14079,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3680,12 +14099,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3700,12 +14123,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -3748,7 +14175,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3768,12 +14195,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3788,12 +14219,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -3836,7 +14271,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3856,12 +14291,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3876,12 +14315,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -3924,7 +14367,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3944,12 +14387,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3964,12 +14411,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4012,7 +14463,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4032,12 +14483,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4052,12 +14507,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4100,7 +14559,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4120,12 +14579,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4140,12 +14603,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4188,7 +14655,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4208,12 +14675,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4228,12 +14699,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4276,7 +14751,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4296,12 +14771,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4316,12 +14795,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4364,7 +14847,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4384,12 +14867,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4404,12 +14891,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4452,7 +14943,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4472,12 +14963,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4492,12 +14987,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4540,7 +15039,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4563,12 +15062,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4583,12 +15086,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4634,7 +15141,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4654,12 +15161,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4674,12 +15185,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4700,7 +15215,7 @@ ] }, { - "description": "c layer (=Torabo L5): macOS の設定に合わせて F1–F12 を標準ファンクションキーとして送る", + "description": "外付けキーボード(従来配列) c layer (=Torabo L5): macOS の設定に合わせて F1–F12 を標準ファンクションキーとして送る", "manipulators": [ { "type": "basic", @@ -4716,7 +15231,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -4738,12 +15253,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4773,7 +15292,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -4813,12 +15332,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4833,12 +15356,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -4901,7 +15428,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -4941,12 +15468,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4961,12 +15492,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5029,7 +15564,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5069,12 +15604,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5089,12 +15628,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5157,7 +15700,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5197,12 +15740,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5217,12 +15764,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5285,7 +15836,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5325,12 +15876,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5345,12 +15900,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5413,7 +15972,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5453,12 +16012,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5473,12 +16036,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5541,7 +16108,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5581,12 +16148,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5601,12 +16172,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5669,7 +16244,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5709,12 +16284,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5729,12 +16308,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5797,7 +16380,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5837,12 +16420,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5857,12 +16444,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5925,7 +16516,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5965,12 +16556,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5985,12 +16580,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -6053,7 +16652,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -6093,12 +16692,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6113,12 +16716,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -6181,7 +16788,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -6221,12 +16828,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6241,12 +16852,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -6287,7 +16902,7 @@ ] }, { - "description": "x layer (=Torabo L9): 音量・再生・輝度・Launchpad / Mission Control", + "description": "外付けキーボード(従来配列) x layer (=Torabo L9): 音量・再生・輝度・Launchpad / Mission Control", "manipulators": [ { "type": "basic", @@ -6303,7 +16918,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6325,12 +16940,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6360,7 +16979,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6380,12 +16999,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6400,12 +17023,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6448,7 +17075,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6468,12 +17095,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6488,12 +17119,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6536,7 +17171,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6556,12 +17191,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6576,12 +17215,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6624,7 +17267,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6644,12 +17287,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6664,12 +17311,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6712,7 +17363,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6732,12 +17383,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6752,12 +17407,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6800,7 +17459,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6820,12 +17479,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6840,12 +17503,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6888,7 +17555,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6908,12 +17575,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6928,12 +17599,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6976,7 +17651,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6996,12 +17671,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7016,12 +17695,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7064,7 +17747,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7084,12 +17767,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7104,12 +17791,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7152,7 +17843,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7172,12 +17863,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7192,12 +17887,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7240,7 +17939,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7260,12 +17959,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7280,12 +17983,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7328,7 +18035,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7348,12 +18055,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7368,12 +18079,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7394,7 +18109,7 @@ ] }, { - "description": "z hold=Control(Toraboと同じ)。単押しは z", + "description": "外付けキーボード(従来配列) z hold=Control(Toraboと同じ)。単押しは z", "manipulators": [ { "type": "basic", @@ -7409,7 +18124,7 @@ "to": [ { "set_variable": { - "name": "z_ctrl", + "name": "external_z_ctrl", "value": true, "key_up_value": false } @@ -7435,6 +18150,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } diff --git a/.config/karabiner/karabiner.json b/.config/karabiner/karabiner.json index ce898a0..9407c55 100644 --- a/.config/karabiner/karabiner.json +++ b/.config/karabiner/karabiner.json @@ -30,7 +30,7 @@ ], "to": [ { - "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show'" + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show torabo'" } ], "to_after_key_up": [ @@ -623,7 +623,10142 @@ ] }, { - "description": "Torabo 以外で右 Shift の左隣のキーをハイフンにする", + "description": "Mac内蔵JIS専用 f layer (=Torabo L2); hjkl arrows; q Esc; e/u ⌫; p ⌦; a/s Tab; d ⌘; f+n=ABC f+m=あいう; f+b=HUD; 英数 tap=Enter hold=⌘; space hold=Shift [hold=e]", + "manipulators": [ + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "f" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "any", + "to_after_key_up": [ + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud hide'" + } + ] + }, + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show jis'" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 350 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "f", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show jis'" + } + ], + "to_after_key_up": [ + { + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud hide'" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "down_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "up_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "tab" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command" + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 500 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "eisuu_cmd", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "mandatory": [ + "command" + ], + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_cmd_layer", + "value": true, + "key_up_value": false + } + }, + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "f", + "modifiers": [ + "left_command" + ] + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "eisuu_cmd", + "value": true + } + ], + "from": { + "key_code": "e", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_cmd_layer", + "value": true, + "key_up_value": false + } + }, + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "f", + "modifiers": [ + "left_command" + ] + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "down_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "up_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + }, + { + "type": "variable_if", + "name": "space_shift", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command", + "left_shift" + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + }, + { + "type": "variable_if", + "name": "eisuu_cmd", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command" + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab", + "modifiers": [ + "left_command" + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "down_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "up_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "right_arrow" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "delete_or_backspace" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "down_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "up_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "right_arrow" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "delete_or_backspace" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "tab" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "tab" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "1" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "escape" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "1", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "escape" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "delete_or_backspace" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "delete_or_backspace" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "q" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "tab" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "q", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "tab" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "w" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_command" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "w", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_command" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "delete_forward" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "delete_forward" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_cmd_layer", + "value": true + } + ], + "from": { + "key_code": "spacebar", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "space_shift", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_shift" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "spacebar", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "space_shift", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_shift", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "spacebar" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "japanese_eisuu" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "e" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "japanese_kana" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "japanese_eisuu" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "japanese_kana" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "f_held", + "value": true + } + ], + "from": { + "key_code": "japanese_eisuu", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "eisuu_cmd", + "value": true, + "key_up_value": false + } + }, + { + "set_variable": { + "name": "f_cmd_layer", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_command" + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "from": { + "key_code": "japanese_eisuu", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "eisuu_cmd", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_command" + } + ], + "to_if_alone": [ + { + "key_code": "return_or_enter" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "from": { + "key_code": "japanese_kana", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "space_shift", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_shift", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "spacebar" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "from": { + "key_code": "right_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "eisuu_cmd", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "right_command", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "return_or_enter" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + } + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "f_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "f" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 d layer: n m , j k l u i o p → 1-0 number pad [hold=w]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "d" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "1" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "1" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "2" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "2" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "3" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "3" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "4" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "4" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "5" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "5" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "6" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "6" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "7" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "7" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "8" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "8" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "9" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "9" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "w" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "d_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "0" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "d_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "0" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 v layer: punctuation + h→~ + y→¥ [hold=d]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "v" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "comma" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "comma" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "period" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "period" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "slash" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "slash" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "semicolon" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "semicolon" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "quote" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "quote" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "backslash" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "backslash" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "hyphen" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "hyphen" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "equal_sign" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "equal_sign" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "open_bracket" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "open_bracket" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "close_bracket" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "close_bracket" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "grave_accent_and_tilde", + "modifiers": [ + "left_shift" + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "grave_accent_and_tilde", + "modifiers": [ + "left_shift" + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "d" + }, + { + "key_code": "0" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "v_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "international3" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "v_held", + "value": true + } + ], + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "international3" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 c layer (=Torabo L5): macOS の設定に合わせて F1–F12 を標準ファンクションキーとして送る [hold=s]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "c" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "0" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f12", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f12", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f12", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f12", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f7", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f7", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f7", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f7", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f8", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f8", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f8", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f8", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f9", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f9", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f9", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f9", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f11", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f11", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f11", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f11", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f4", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f4", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f4", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f4", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f5", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f5", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f5", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f5", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f6", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f6", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f6", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f6", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f10", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f10", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f10", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f10", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f1", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f1", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f1", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f1", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f2", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f2", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f2", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f2", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "s" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "c_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "f3", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f3", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "c_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "f3", + "conditions": [ + { + "type": "variable_if", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + }, + { + "key_code": "f3", + "modifiers": [ + "fn" + ], + "conditions": [ + { + "type": "variable_unless", + "name": "system.use_fkeys_as_standard_function_keys", + "value": true + } + ] + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 x layer (=Torabo L9): 音量・再生・輝度・Launchpad / Mission Control [hold=a]", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + } + ], + "to_if_alone": [ + { + "key_code": "x" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "0" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "volume_increment" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "volume_increment" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "hyphen" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "rewind" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "rewind" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "equal_sign" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "play_or_pause" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "play_or_pause" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "international3" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "fast_forward" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "fast_forward" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "o" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "volume_decrement" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "volume_decrement" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "p" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "launchpad" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "launchpad" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "open_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_decrement" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_decrement" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "close_bracket" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_increment" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_increment" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "return_or_enter" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "consumer_key_code": "mute" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "consumer_key_code": "mute" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "semicolon" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_decrement" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_decrement" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "quote" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "display_brightness_increment" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "display_brightness_increment" + } + ] + }, + { + "type": "basic", + "from": { + "simultaneous": [ + { + "key_code": "a" + }, + { + "key_code": "backslash" + } + ], + "simultaneous_options": { + "key_down_order": "strict", + "key_up_when": "all" + }, + "modifiers": { + "optional": [ + "caps_lock", + "shift" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "x_held", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "mission_control" + } + ], + "parameters": { + "basic.simultaneous_threshold_milliseconds": 250 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_unless", + "name": "f_held", + "value": true + } + ] + }, + { + "type": "basic", + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + }, + { + "type": "variable_if", + "name": "x_held", + "value": true + } + ], + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "mission_control" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 Mac JIS 上・外側ずらし(Torabo除外)。物理→出力 / 出力なし / cmd→opt", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "1", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "q" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "2", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "w" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "e" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "4", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "r" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "5", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "t" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "6", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "7", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "8", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "9", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "0", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "y" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "hyphen", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "u" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "equal_sign", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "i" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "international3", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "o" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "q", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "s" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "r", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "g" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "t", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "y", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "u", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "i", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "o", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "h" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "p", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "j" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "open_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "k" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "close_bracket", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "l" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "b" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "g", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "h", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "j", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "k", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "semicolon", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "n" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "quote", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "m" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "backslash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "slash" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "z", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "x", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "c", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "v", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "b", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "n", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "m", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "comma", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "period", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "slash", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "tab", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "a" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "return_or_enter", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "p" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "international1", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_command", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "to": [ + { + "key_code": "left_option" + } + ], + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "left_option", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "right_option", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "vk_none" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "f" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "w", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "d" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "v" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "c" + } + ] + }, + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "optional": [ + "any" + ] + } + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ], + "to": [ + { + "key_code": "x" + } + ] + } + ] + }, + { + "description": "Mac内蔵JIS専用 control tap=z hold=Control(Toraboの z/⌃ を control へ移す)", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "left_control", + "modifiers": { + "optional": [ + "caps_lock" + ] + } + }, + "to": [ + { + "set_variable": { + "name": "z_ctrl", + "value": true, + "key_up_value": false + } + }, + { + "key_code": "left_control", + "lazy": true + } + ], + "to_if_alone": [ + { + "key_code": "z" + } + ], + "parameters": { + "basic.to_if_alone_timeout_milliseconds": 200 + }, + "conditions": [ + { + "type": "device_if", + "identifiers": [ + { + "is_keyboard": true, + "is_built_in_keyboard": true + } + ] + }, + { + "type": "device_unless", + "identifiers": [ + { + "vendor_id": 65261, + "product_id": 48301, + "is_keyboard": true + } + ] + } + ] + } + ] + }, + { + "description": "外付けキーボード(従来配列) Torabo 以外で右 Shift の左隣のキーをハイフンにする", "manipulators": [ { "type": "basic", @@ -648,6 +10783,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -656,7 +10795,7 @@ ] }, { - "description": "f layer (=Torabo L2); hjkl arrows; q Esc; e/u ⌫; p ⌦; a/s Tab; d ⌘; f+n=ABC f+m=あいう; f+b=HUD; 英数 tap=Enter hold=⌘; space hold=Shift", + "description": "外付けキーボード(従来配列) f layer (=Torabo L2); hjkl arrows; q Esc; e/u ⌫; p ⌦; a/s Tab; d ⌘; f+n=ABC f+m=あいう; f+b=HUD; 英数 tap=Enter hold=⌘; space hold=Shift", "manipulators": [ { "type": "basic", @@ -674,14 +10813,14 @@ "to": [ { "set_variable": { - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true, "key_up_value": false } }, { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -706,6 +10845,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -721,12 +10864,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true } ], @@ -741,14 +10888,14 @@ "to": [ { "set_variable": { - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true, "key_up_value": false } }, { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -776,12 +10923,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -809,12 +10960,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -842,12 +10997,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -875,12 +11034,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -908,17 +11071,21 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true }, { "type": "variable_if", - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true } ], @@ -949,17 +11116,21 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true }, { "type": "variable_if", - "name": "space_shift", + "name": "external_space_shift", "value": true } ], @@ -991,12 +11162,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -1057,6 +11232,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1102,6 +11281,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1147,6 +11330,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1192,6 +11379,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1237,12 +11428,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true } ] @@ -1260,7 +11455,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1282,6 +11477,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1311,7 +11510,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1331,6 +11530,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1360,7 +11563,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1380,6 +11583,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1409,7 +11616,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1429,6 +11636,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1458,7 +11669,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1478,6 +11689,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1507,7 +11722,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1527,6 +11742,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1542,12 +11761,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1575,12 +11798,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1608,12 +11835,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1641,12 +11872,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1674,12 +11909,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1721,7 +11960,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1741,6 +11980,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1756,12 +11999,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1803,7 +12050,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1823,6 +12070,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1838,12 +12089,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1885,7 +12140,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1905,6 +12160,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -1920,12 +12179,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -1967,7 +12230,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -1987,6 +12250,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2002,12 +12269,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2049,7 +12320,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2069,6 +12340,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2084,12 +12359,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2131,7 +12410,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2151,6 +12430,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2166,12 +12449,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2199,12 +12486,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true } ], @@ -2219,7 +12510,7 @@ "to": [ { "set_variable": { - "name": "space_shift", + "name": "external_space_shift", "value": true, "key_up_value": false } @@ -2242,7 +12533,7 @@ "to": [ { "set_variable": { - "name": "space_shift", + "name": "external_space_shift", "value": true, "key_up_value": false } @@ -2268,6 +12559,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2297,7 +12592,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2317,6 +12612,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2346,7 +12645,7 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } @@ -2366,6 +12665,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2381,12 +12684,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2414,12 +12721,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2447,12 +12758,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2467,14 +12782,14 @@ "to": [ { "set_variable": { - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true, "key_up_value": false } }, { "set_variable": { - "name": "f_cmd_layer", + "name": "external_f_cmd_layer", "value": true, "key_up_value": false } @@ -2494,6 +12809,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2509,7 +12828,7 @@ "to": [ { "set_variable": { - "name": "eisuu_cmd", + "name": "external_eisuu_cmd", "value": true, "key_up_value": false } @@ -2537,6 +12856,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2592,13 +12915,13 @@ "to": [ { "set_variable": { - "name": "f_held", + "name": "external_f_held", "value": true, "key_up_value": false } }, { - "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show'" + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show external'" } ], "parameters": { @@ -2612,6 +12935,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } @@ -2627,12 +12954,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "f_held", + "name": "external_f_held", "value": true } ], @@ -2646,7 +12977,7 @@ }, "to": [ { - "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show'" + "shell_command": "/bin/bash -lc '$HOME/.bin/karabiner-keymap-hud show external'" } ], "to_after_key_up": [ @@ -2658,7 +12989,7 @@ ] }, { - "description": "d layer: n m , j k l u i o p → 1-0 number pad", + "description": "外付けキーボード(従来配列) d layer: n m , j k l u i o p → 1-0 number pad", "manipulators": [ { "type": "basic", @@ -2674,7 +13005,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2696,12 +13027,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2731,7 +13066,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2751,12 +13086,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2771,12 +13110,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -2819,7 +13162,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2839,12 +13182,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2859,12 +13206,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -2907,7 +13258,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -2927,12 +13278,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -2947,12 +13302,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -2995,7 +13354,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3015,12 +13374,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3035,12 +13398,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3083,7 +13450,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3103,12 +13470,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3123,12 +13494,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3171,7 +13546,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3191,12 +13566,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3211,12 +13590,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3259,7 +13642,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3279,12 +13662,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3299,12 +13686,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3347,7 +13738,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3367,12 +13758,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3387,12 +13782,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3435,7 +13834,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3455,12 +13854,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3475,12 +13878,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3523,7 +13930,7 @@ "to": [ { "set_variable": { - "name": "d_held", + "name": "external_d_held", "value": true, "key_up_value": false } @@ -3543,12 +13950,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3563,12 +13974,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "d_held", + "name": "external_d_held", "value": true } ], @@ -3589,7 +14004,7 @@ ] }, { - "description": "v layer: punctuation + h→~ + y→¥", + "description": "外付けキーボード(従来配列) v layer: punctuation + h→~ + y→¥", "manipulators": [ { "type": "basic", @@ -3605,7 +14020,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3627,12 +14042,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3662,7 +14081,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3682,12 +14101,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3702,12 +14125,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -3750,7 +14177,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3770,12 +14197,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3790,12 +14221,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -3838,7 +14273,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3858,12 +14293,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3878,12 +14317,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -3926,7 +14369,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -3946,12 +14389,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -3966,12 +14413,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4014,7 +14465,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4034,12 +14485,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4054,12 +14509,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4102,7 +14561,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4122,12 +14581,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4142,12 +14605,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4190,7 +14657,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4210,12 +14677,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4230,12 +14701,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4278,7 +14753,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4298,12 +14773,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4318,12 +14797,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4366,7 +14849,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4386,12 +14869,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4406,12 +14893,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4454,7 +14945,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4474,12 +14965,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4494,12 +14989,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4542,7 +15041,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4565,12 +15064,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4585,12 +15088,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4636,7 +15143,7 @@ "to": [ { "set_variable": { - "name": "v_held", + "name": "external_v_held", "value": true, "key_up_value": false } @@ -4656,12 +15163,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4676,12 +15187,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "v_held", + "name": "external_v_held", "value": true } ], @@ -4702,7 +15217,7 @@ ] }, { - "description": "c layer (=Torabo L5): macOS の設定に合わせて F1–F12 を標準ファンクションキーとして送る", + "description": "外付けキーボード(従来配列) c layer (=Torabo L5): macOS の設定に合わせて F1–F12 を標準ファンクションキーとして送る", "manipulators": [ { "type": "basic", @@ -4718,7 +15233,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -4740,12 +15255,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4775,7 +15294,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -4815,12 +15334,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4835,12 +15358,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -4903,7 +15430,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -4943,12 +15470,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -4963,12 +15494,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5031,7 +15566,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5071,12 +15606,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5091,12 +15630,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5159,7 +15702,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5199,12 +15742,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5219,12 +15766,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5287,7 +15838,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5327,12 +15878,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5347,12 +15902,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5415,7 +15974,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5455,12 +16014,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5475,12 +16038,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5543,7 +16110,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5583,12 +16150,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5603,12 +16174,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5671,7 +16246,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5711,12 +16286,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5731,12 +16310,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5799,7 +16382,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5839,12 +16422,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5859,12 +16446,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -5927,7 +16518,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -5967,12 +16558,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -5987,12 +16582,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -6055,7 +16654,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -6095,12 +16694,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6115,12 +16718,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -6183,7 +16790,7 @@ "to": [ { "set_variable": { - "name": "c_held", + "name": "external_c_held", "value": true, "key_up_value": false } @@ -6223,12 +16830,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6243,12 +16854,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "c_held", + "name": "external_c_held", "value": true } ], @@ -6289,7 +16904,7 @@ ] }, { - "description": "x layer (=Torabo L9): 音量・再生・輝度・Launchpad / Mission Control", + "description": "外付けキーボード(従来配列) x layer (=Torabo L9): 音量・再生・輝度・Launchpad / Mission Control", "manipulators": [ { "type": "basic", @@ -6305,7 +16920,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6327,12 +16942,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6362,7 +16981,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6382,12 +17001,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6402,12 +17025,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6450,7 +17077,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6470,12 +17097,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6490,12 +17121,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6538,7 +17173,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6558,12 +17193,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6578,12 +17217,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6626,7 +17269,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6646,12 +17289,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6666,12 +17313,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6714,7 +17365,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6734,12 +17385,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6754,12 +17409,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6802,7 +17461,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6822,12 +17481,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6842,12 +17505,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6890,7 +17557,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6910,12 +17577,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -6930,12 +17601,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -6978,7 +17653,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -6998,12 +17673,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7018,12 +17697,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7066,7 +17749,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7086,12 +17769,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7106,12 +17793,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7154,7 +17845,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7174,12 +17865,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7194,12 +17889,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7242,7 +17941,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7262,12 +17961,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7282,12 +17985,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7330,7 +18037,7 @@ "to": [ { "set_variable": { - "name": "x_held", + "name": "external_x_held", "value": true, "key_up_value": false } @@ -7350,12 +18057,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_unless", - "name": "f_held", + "name": "external_f_held", "value": true } ] @@ -7370,12 +18081,16 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] }, { "type": "variable_if", - "name": "x_held", + "name": "external_x_held", "value": true } ], @@ -7396,7 +18111,7 @@ ] }, { - "description": "z hold=Control(Toraboと同じ)。単押しは z", + "description": "外付けキーボード(従来配列) z hold=Control(Toraboと同じ)。単押しは z", "manipulators": [ { "type": "basic", @@ -7411,7 +18126,7 @@ "to": [ { "set_variable": { - "name": "z_ctrl", + "name": "external_z_ctrl", "value": true, "key_up_value": false } @@ -7437,6 +18152,10 @@ "vendor_id": 65261, "product_id": 48301, "is_keyboard": true + }, + { + "is_keyboard": true, + "is_built_in_keyboard": true } ] } diff --git a/.config/karabiner/keymap-layers-external.json b/.config/karabiner/keymap-layers-external.json new file mode 100644 index 0000000..9a3f012 --- /dev/null +++ b/.config/karabiner/keymap-layers-external.json @@ -0,0 +1,109 @@ +[ + { + "id": "base", + "name": "Base", + "trigger": "通常入力", + "bindings": { + "eisuu": "↩/⌘", + "kana": "↩/⌘", + "space": "␣/⇧", + "z": "z/⌃", + "\\": "-" + } + }, + { + "id": "f", + "name": "f", + "trigger": "f 押し込み中(=Torabo 移動)", + "bindings": { + "q": "Esc", + "e": "⌫", + "u": "⌫", + "p": "⌦", + "a": "⇥", + "s": "⇥", + "d": "⌘", + "h": "←", + "j": "↓", + "k": "↑", + "l": "→", + "n": "ABC", + "m": "あいう", + "b": "map" + } + }, + { + "id": "d", + "name": "d", + "trigger": "d 押し込み中(=Torabo 数字)", + "bindings": { + "n": "1", + "m": "2", + ",": "3", + "j": "4", + "k": "5", + "l": "6", + "u": "7", + "i": "8", + "o": "9", + "p": "0" + } + }, + { + "id": "v", + "name": "v", + "trigger": "v 押し込み中(=Torabo 記号)", + "bindings": { + "n": ",", + "m": ".", + ",": "/", + "j": ";", + "k": "'", + "l": "\\", + "u": "-", + "i": "=", + "o": "[", + "p": "]", + "h": "~", + "y": "¥" + } + }, + { + "id": "c", + "name": "c", + "trigger": "c 押し込み中(=Torabo ファンクション)", + "bindings": { + "y": "F12", + "u": "F7", + "i": "F8", + "o": "F9", + "h": "F11", + "j": "F4", + "k": "F5", + "l": "F6", + "p": "F10", + "n": "F1", + "m": "F2", + ",": "F3" + } + }, + { + "id": "x", + "name": "x", + "trigger": "x 押し込み中(=Torabo メディア)", + "bindings": { + "y": "音量+", + "u": "前", + "i": "再生", + "o": "次", + "h": "音量−", + "j": "Launchpad", + "k": "輝度−", + "l": "輝度+", + "p": "消音", + "n": "輝度−", + "m": "輝度+", + ",": "Mission Control" + } + } +] diff --git a/.config/karabiner/keymap-layers.json b/.config/karabiner/keymap-layers.json index c15793a..e4e97c2 100644 --- a/.config/karabiner/keymap-layers.json +++ b/.config/karabiner/keymap-layers.json @@ -6,108 +6,167 @@ { "id": "base", "name": "Base", - "trigger": "通常入力", + "trigger": "通常入力(上・外側ずらし)", "bindings": { "eisuu": "↩/⌘", - "kana": "↩/⌘", + "kana": "␣/⇧", "space": "␣/⇧", - "z": "z/⌃" + "control": "z/⌃", + "command_l": "⌥", + "command_r": "↩/⌘", + "tab": "a", + "1": "q", + "2": "w", + "3": "e", + "4": "r", + "5": "t", + "0": "y", + "-": "u", + "^": "i", + "¥": "o", + "q": "s", + "w": "d", + "e": "f", + "r": "g", + "o": "h", + "p": "j", + "@": "k", + "[": "l", + "a": "x", + "s": "c", + "d": "v", + "f": "b", + ";": "n", + ":": "m", + "]": "/", + "return": "p", + "6": "∅", + "7": "∅", + "8": "∅", + "9": "∅", + "t": "∅", + "y": "∅", + "u": "∅", + "i": "∅", + "g": "∅", + "h": "∅", + "j": "∅", + "k": "∅", + "l": "∅", + "z": "∅", + "x": "∅", + "c": "∅", + "v": "∅", + "b": "∅", + "n": "∅", + "m": "∅", + ",": "∅", + ".": "∅", + "/": "∅", + "\\": "∅", + "option_l": "∅", + "option_r": "∅" } }, { "id": "f", - "name": "f", - "trigger": "f 押し込み中(=Torabo 移動)", + "name": "e", + "trigger": "e 押し込み中", "bindings": { - "q": "Esc", - "e": "⌫", - "u": "⌫", - "p": "⌦", - "a": "⇥", - "s": "⇥", - "d": "⌘", - "h": "←", - "j": "↓", - "k": "↑", - "l": "→", - "n": "ABC", - "m": "あいう", - "b": "map" - } + "1": "Esc", + "3": "⌫", + "-": "⌫", + "return": "⌦", + "tab": "⇥", + "q": "⇥", + "w": "⌘", + "o": "←", + "p": "↓", + "@": "↑", + "[": "→", + ";": "ABC", + ":": "あいう", + "f": "map" + }, + "hold": "e" }, { "id": "d", - "name": "d", - "trigger": "d 押し込み中(=Torabo 数字)", + "name": "w", + "trigger": "w 押し込み中", "bindings": { - "n": "1", - "m": "2", - ",": "3", - "j": "4", - "k": "5", - "l": "6", - "u": "7", - "i": "8", - "o": "9", - "p": "0" - } + ";": "1", + ":": "2", + "]": "3", + "p": "4", + "@": "5", + "[": "6", + "-": "7", + "^": "8", + "¥": "9", + "return": "0" + }, + "hold": "w" }, { "id": "v", - "name": "v", - "trigger": "v 押し込み中(=Torabo 記号)", + "name": "d", + "trigger": "d 押し込み中", "bindings": { - "n": ",", - "m": ".", - ",": "/", - "j": ";", - "k": "'", - "l": "\\", - "u": "-", - "i": "=", - "o": "[", - "p": "]", - "h": "~", - "y": "¥" - } + ";": ",", + ":": ".", + "]": "/", + "p": ";", + "@": "'", + "[": "\\", + "-": "-", + "^": "=", + "¥": "[", + "return": "]", + "o": "~", + "0": "¥" + }, + "hold": "d" }, { "id": "c", - "name": "c", - "trigger": "c 押し込み中(=Torabo ファンクション)", + "name": "s", + "trigger": "s 押し込み中", "bindings": { - "y": "F12", - "u": "F7", - "i": "F8", - "o": "F9", - "h": "F11", - "j": "F4", - "k": "F5", - "l": "F6", - "p": "F10", - "n": "F1", - "m": "F2", - ",": "F3" - } + "0": "F12", + "-": "F7", + "^": "F8", + "¥": "F9", + "o": "F11", + "p": "F4", + "@": "F5", + "[": "F6", + "return": "F10", + ";": "F1", + ":": "F2", + "]": "F3" + }, + "hold": "s" }, { "id": "x", - "name": "x", - "trigger": "x 押し込み中(=Torabo メディア)", + "name": "a", + "trigger": "a 押し込み中", "bindings": { - "y": "音量+", - "u": "前", - "i": "再生", - "o": "次", - "h": "音量−", - "j": "Launchpad", - "k": "輝度−", - "l": "輝度+", - "p": "消音", - "n": "輝度−", - "m": "輝度+", - ",": "Mission Control" - } + "0": "音量+", + "-": "前", + "^": "再生", + "¥": "次", + "o": "音量−", + "p": "Launchpad", + "@": "輝度−", + "[": "輝度+", + "return": "消音", + ";": "輝度−", + ":": "輝度+", + "]": "Mission Control" + }, + "hold": "a" } ], "rows": [ diff --git a/.config/karabiner/scripts/keymap-hud.html b/.config/karabiner/scripts/keymap-hud.html index dfbb522..d076e1f 100644 --- a/.config/karabiner/scripts/keymap-hud.html +++ b/.config/karabiner/scripts/keymap-hud.html @@ -167,6 +167,24 @@ border-color: rgba(169, 182, 101, 0.4); color: #1d2021; } + .key.shifted { + background: linear-gradient(180deg, #5a524c 0%, #45403d 100%); + border-color: rgba(168, 153, 132, 0.35); + color: var(--fg0); + } + .key.shifted .action { color: var(--fg0); } + .key.dead { + background: #000; + border-color: #000; + box-shadow: none; + color: transparent; + } + .key.dead .shift, + .key.dead .base, + .key.dead .action, + .key.dead .kana, + .key.dead .glyph, + .key.dead .word { display: none; } .key .shift { position: absolute; top: 3px; @@ -250,6 +268,25 @@ letter-spacing: 0.02em; pointer-events: none; } + .key.jis-return .action { + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + z-index: 2; + margin: 0; + font-size: 14px; + font-weight: 750; + color: var(--fg0); + line-height: 1; + pointer-events: none; + } + .key.jis-return.mapped .action { + color: #1d2021; + } + .key.jis-return.shifted .action { + color: var(--fg0); + } .key.bracket-close { z-index: 3; position: relative; @@ -314,6 +351,8 @@ } .swatch.holder { background: #a04300; } .swatch.mapped { background: #556340; } + .swatch.shifted { background: #5a524c; } + .swatch.dead { background: #000; border: 1px solid #333; } .swatch.normal { background: #3c3836; } /* 分割配列はキーの座標を保ち、レイヤー数が多い場合も全体が画面の幅と高さに収まるようにする。 */ .torabo-keymap .shell { width: min(1240px, 100vw); } @@ -376,19 +415,70 @@

Keymap Layers · JIS shape / US legends

return wrap; } + function isDeadBinding(value) { + return value === "∅" || value === "" || value === null; + } + + function baseDeadKeys(def) { + const base = (def.layers || []).find((layer) => layer.id === "base"); + const dead = new Set(); + if (!base || !base.bindings) return dead; + for (const [key, value] of Object.entries(base.bindings)) { + if (isDeadBinding(value)) dead.add(key); + } + return dead; + } + + function baseBindings(def) { + const base = (def.layers || []).find((layer) => layer.id === "base"); + return (base && base.bindings) || {}; + } + function createKey(key, layer, def, options = {}) { if (key === "arrow_cluster") return createArrowCluster(); const bindings = layer.bindings || {}; - const mapped = bindings[key]; + const isHoldLayer = layer.id !== "base"; + const hideUnassigned = isHoldLayer && !options.external; + const isHoldKey = key === (layer.hold || layer.id); + const layerMapped = Object.prototype.hasOwnProperty.call(bindings, key) ? bindings[key] : undefined; + const baseMapped = baseBindings(def)[key]; + const fromLayer = layerMapped !== undefined && !isDeadBinding(layerMapped); + const fromBaseShift = !fromLayer && baseMapped !== undefined && !isDeadBinding(baseMapped); + + // 押し込み中: レイヤー割当 → 移動後のみ。出力なし・未割当・押し込みキー自体は文字なし。 + let mapped; + let dead = false; + if (fromLayer) { + mapped = layerMapped; + } else if (isHoldKey) { + mapped = undefined; + } else if (baseDeadKeys(def).has(key) || isDeadBinding(baseMapped)) { + dead = true; + } else if (fromBaseShift) { + mapped = baseMapped; + } else if (hideUnassigned) { + dead = true; + } else { + mapped = undefined; + } + const keyEl = document.createElement("div"); keyEl.className = "key"; keyEl.style.cssText = widthStyle((def.key_widths && def.key_widths[key]) || 1); if (options.jisReturn) keyEl.classList.add("jis-return"); if (key === "]") keyEl.classList.add("bracket-close"); if (key === "space") keyEl.classList.add("space"); - if (key === layer.id) keyEl.classList.add("holder"); - if (mapped) keyEl.classList.add("mapped"); + if (isHoldKey) keyEl.classList.add("holder"); + if (dead) { + keyEl.classList.add("dead"); + if (options.jisReturn) { + keyEl.style.background = "#000"; + keyEl.replaceChildren(); + } + return keyEl; + } + if (mapped) keyEl.classList.add(fromLayer || layer.id === "base" ? "mapped" : "shifted"); const mods = new Set([ "esc", "delete", "tab", "control", "shift_l", "shift_r", "return", @@ -397,26 +487,19 @@

Keymap Layers · JIS shape / US legends

]); if (mods.has(key)) keyEl.classList.add("mod"); - // 出力キーに対応する Shift 記号があるなら上段に出す(数字・,./ など) - const mappedShift = mapped && ((def.us_shift_labels && def.us_shift_labels[mapped]) || (def.shift_labels && def.shift_labels[mapped])); - const shift = !mappedShift && def.shift_labels && def.shift_labels[key]; - if (shift) { - const shiftEl = document.createElement("div"); - shiftEl.className = "shift"; - shiftEl.textContent = shift; - keyEl.appendChild(shiftEl); - } - const glyph = def.key_glyphs && def.key_glyphs[key]; if (options.jisReturn) { // Apple JIS return: top full-width, bottom left inset ~19% (official asset ratio). const gid = `retGrad-${layer.id}-${Math.random().toString(36).slice(2, 7)}`; + const layered = fromLayer || layer.id === "base"; + const fillTop = mapped ? (layered ? "#6f8250" : "#5a524c") : "#45403d"; + const fillBot = mapped ? (layered ? "#556340" : "#45403d") : "#3c3836"; keyEl.innerHTML = ` `; - const g = document.createElement("div"); - g.className = "glyph"; - g.textContent = glyph || "↩"; - const w = document.createElement("div"); - w.className = "word"; - w.textContent = "return"; - keyEl.appendChild(g); - keyEl.appendChild(w); + if (mapped) { + const action = document.createElement("div"); + action.className = "action"; + action.textContent = mapped; + keyEl.appendChild(action); + } else if (!hideUnassigned) { + const action = document.createElement("div"); + action.className = "action"; + action.textContent = glyph || "↩"; + keyEl.appendChild(action); + } return keyEl; } + // 移動後の出力(またはレイヤー割り当て)だけを表示する if (mapped) { - const label = document.createElement("div"); - label.className = mappedShift ? "shift" : "base"; - label.textContent = mappedShift || displayName(key, def); - keyEl.appendChild(label); const action = document.createElement("div"); action.className = "action"; action.textContent = mapped; if (mapped.length > 8) keyEl.dataset.longLabel = ""; keyEl.appendChild(action); - } else if (key !== "space") { + } else if (!hideUnassigned && key !== "space") { const name = displayName(key, def); if (!name && !glyph) { keyEl.style.visibility = "hidden"; return keyEl; } const label = document.createElement("div"); - if (glyph && key !== "eisuu" && key !== "kana" && key !== "fn") { - label.textContent = `${glyph} ${name}`; + // glyph と label が同じ(⌫⌫ など)にならないよう一つだけ出す + if (glyph && name && glyph !== name && key !== "eisuu" && key !== "kana" && key !== "fn") { + label.textContent = glyph; label.style.fontSize = "10px"; } else { - label.textContent = name; + label.textContent = glyph || name; } keyEl.appendChild(label); } return keyEl; } - function renderLayer(layer, def) { + function renderLayer(layer, def, external) { const bindings = layer.bindings || {}; - const summary = Object.keys(bindings).length === 0 + const summaryEntries = Object.keys(bindings) + .filter((key) => !isDeadBinding(bindings[key])) + .sort() + .map((key) => `${displayName(key, def)}→${bindings[key]}`); + const summary = summaryEntries.length === 0 ? "JIS 形状 · US 刻印" - : Object.keys(bindings).sort().map((key) => `${displayName(key, def)}→${bindings[key]}`).join(" "); - const board = createBoard(`${layer.name} · ${layer.trigger}`, summary, layer.id === "f"); + : summaryEntries.join(" "); + const board = createBoard(`${layer.name} · ${layer.trigger}`, summary, Boolean(layer.hold)); const keyboard = document.createElement("div"); keyboard.className = "keyboard"; @@ -489,10 +577,10 @@

Keymap Layers · JIS shape / US legends

rowEl.className = "row"; const extras = (def.row_extras && def.row_extras[String(rowIndex)]) || []; for (const key of row) { - rowEl.appendChild(createKey(key, layer, def)); + rowEl.appendChild(createKey(key, layer, def, { external })); for (const extra of extras) { if (extra.after === key && !extra.placeholder) { - rowEl.appendChild(createKey(extra.key, layer, def, { jisReturn: extra.key === "return" })); + rowEl.appendChild(createKey(extra.key, layer, def, { external, jisReturn: extra.key === "return" })); } } } @@ -504,7 +592,9 @@

Keymap Layers · JIS shape / US legends

legend.className = "legend"; legend.innerHTML = ` レイヤーキー - リマップ + レイヤー割当 + 移動後 + 出力なし 通常 `; board.appendChild(legend); @@ -512,11 +602,13 @@

Keymap Layers · JIS shape / US legends

} // 常駐処理から表示する配列を受け取り、現在の画面を差し替える。 - function showKeymap(profile) { + function showKeymap(profile, externalLayers) { const root = document.getElementById("layers"); const title = document.querySelector("#keymap-title"); const sub = document.querySelector("#keymap-sub"); - const def = window.__KEYMAP_LAYERS__; + const jis = window.__KEYMAP_LAYERS__; + const external = profile === "external" && Array.isArray(externalLayers) && externalLayers.length > 0; + const def = external ? { ...jis, layers: externalLayers } : jis; const split = profile === "torabo" ? window.__TORABO_KEYMAP__ : null; const useSplit = Boolean(split && Array.isArray(split.keys) && split.keys.length && split.keys.every((key) => key && Number.isFinite(key.x) && Number.isFinite(key.y)) && @@ -536,10 +628,10 @@

Keymap Layers · JIS shape / US legends

return "torabo"; } if (!def) throw new Error("JISの配列データがありません。"); - title.textContent = "Keymap Layers · JIS shape / US legends"; - if (sub) sub.textContent = "f + b で表示 · 離すと閉じる · Gruvbox Material"; - for (const layer of def.layers) root.appendChild(renderLayer(layer, def)); - return "jis"; + title.textContent = external ? "外付けキーボード · JIS 配列" : "内蔵キーボード · JIS 配列"; + if (sub) sub.textContent = external ? "f + b で表示 · 離すと閉じる" : "物理 e + f で表示 · 離すと閉じる"; + for (const layer of def.layers) root.appendChild(renderLayer(layer, def, external)); + return external ? "external" : "jis"; } function renderToraboKeymap(root, definition) { diff --git a/.config/karabiner/scripts/keymap-hud.js b/.config/karabiner/scripts/keymap-hud.js index 82f0038..8a39f0c 100755 --- a/.config/karabiner/scripts/keymap-hud.js +++ b/.config/karabiner/scripts/keymap-hud.js @@ -3,7 +3,7 @@ // 常駐 HUD デーモン(JS)。 // Usage: // osascript -l JavaScript keymap-hud.js daemon -// cmdPath の表示指示に従い、内蔵キーボードまたは Torabo-tsuki のキー一覧を表示する。 +// cmdPath の表示指示に従い、内蔵・外付け・Torabo-tsuki のキー一覧を表示する。 ObjC.import("Cocoa"); ObjC.import("WebKit"); @@ -56,6 +56,14 @@ function batterySubtitle(path) { function keymapDisplayScript(command, path, batteryPath) { const showJis = 'window.showKeymap("jis")'; + if (command === "show external") { + try { + // 形状や凡例は内蔵JISと共有し、外付けのレイヤー定義を読み直す。 + const layers = JSON.parse(readText(path.replace(/[^/]+$/, "keymap-layers-external.json"))); + if (Array.isArray(layers) && layers.length) return `window.showKeymap("external", ${JSON.stringify(layers)})`; + } catch (error) {} + return showJis; + } if (command !== "show torabo") return showJis; try { // 表示のたびにToraboの表示用JSONと、保存された電池残量を読み込む。 @@ -135,7 +143,7 @@ function run(argv) { return; } lastCmd = cmd; - if (cmd === "show" || cmd === "show torabo") { + if (["show", "show jis", "show external", "show torabo"].includes(cmd)) { // 表示内容を切り替えてからパネルを開く。電池は同ディレクトリのキャッシュを読む。 const batteryPath = cmdPath.replace(/[^/]+$/, "torabo-battery.json"); webView.evaluateJavaScriptCompletionHandler( diff --git a/.config/karabiner/scripts/torabo-battery-Info.plist b/.config/karabiner/scripts/torabo-battery-Info.plist new file mode 100755 index 0000000..f6610f1 --- /dev/null +++ b/.config/karabiner/scripts/torabo-battery-Info.plist @@ -0,0 +1,16 @@ + + + + + CFBundleIdentifier + jp.k-mass.torabo-battery + CFBundleName + torabo-battery + CFBundleVersion + 1 + NSBluetoothAlwaysUsageDescription + Torabo-tsuki S の左右の電池残量をキー一覧に表示するために使います。 + NSBluetoothPeripheralUsageDescription + Torabo-tsuki S の左右の電池残量をキー一覧に表示するために使います。 + + diff --git a/.config/karabiner/scripts/torabo-battery.swift b/.config/karabiner/scripts/torabo-battery.swift index 6f67d6f..fbd1526 100644 --- a/.config/karabiner/scripts/torabo-battery.swift +++ b/.config/karabiner/scripts/torabo-battery.swift @@ -51,12 +51,24 @@ final class Reader: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate { func start() { central = CBCentralManager(delegate: self, queue: nil, options: [CBCentralManagerOptionShowPowerAlertKey: false]) - DispatchQueue.main.asyncAfter(deadline: .now() + 3) { self.emit() } + // 初回の Bluetooth 許可ダイアログや GATT 応答待ちの余裕を見る。 + DispatchQueue.main.asyncAfter(deadline: .now() + 5) { self.emit() } } func centralManagerDidUpdateState(_ central: CBCentralManager) { if central.state == .unknown || central.state == .resetting { return } guard central.state == .poweredOn else { emit(); return } + if #available(macOS 10.15, *) { + // 未許可のまま読みに行くと Karabiner 経由で Abort することがある。 + switch CBCentralManager.authorization { + case .denied, .restricted: + FileHandle.standardError.write(Data("bluetooth authorization denied\n".utf8)) + emit() + return + default: + break + } + } guard target == nil else { return } let candidates = central.retrieveConnectedPeripherals(withServices: [bas]) .filter { $0.name?.caseInsensitiveCompare("Torabo-tsuki S") == .orderedSame } diff --git a/.config/karabiner/torabo-tsuki-s.md b/.config/karabiner/torabo-tsuki-s.md index 5d5453c..e870972 100644 --- a/.config/karabiner/torabo-tsuki-s.md +++ b/.config/karabiner/torabo-tsuki-s.md @@ -2,7 +2,7 @@ ZMK版のキー割り当ては [torabo_tsuki.keymap](../torabo-zmk/config/torabo_tsuki.keymap) で管理します。MacでToraboのキー一覧を開くたびに、表示用の [torabo-tsuki-s.json](torabo-tsuki-s.json) を読み込みます。キーを変更するときは [ZMKの手順](../torabo-zmk/README.md) に沿って、ファームウェアのキーマップとMacの表示用データの両方を更新します。変更を依頼するときは「Toraboの数字レイヤーで、右手小指側のキーを0に」など、レイヤーと物理キーと希望する動作を伝えてください。 -Toraboでは `f` を長押ししてから `b` を押すと、移動レイヤーのB位置が表示用の `F24` を送り、Karabinerがキー一覧を開きます。同じ `f` 保持中の `n` が英数(ABC)、`m` がかな(あいう)です。ZMKでは `LANG2` と `LANG1` を使います。内蔵キーボードの `f + b`、`f + n`、`f + m` でも同じ操作ができます。 +Toraboでは `f` を長押ししてから `b` を押すと、移動レイヤーのB位置が表示用の `F24` を送り、Karabinerがキー一覧を開きます。同じ `f` 保持中の `n` が英数(ABC)、`m` がかな(あいう)です。ZMKでは `LANG2` と `LANG1` を使います。Macの内蔵JISでは、物理 `e` を保持して `f` で内蔵のキー一覧、`;` で英数、`:` でかなに切り替えます。 ## BMP/Vial版の設定を編集する diff --git a/.config/torabo-zmk/README.md b/.config/torabo-zmk/README.md index c6c87fd..52f0eb4 100644 --- a/.config/torabo-zmk/README.md +++ b/.config/torabo-zmk/README.md @@ -13,7 +13,7 @@ 2. mainに変更が入るとビルドが始まります。手動でビルドするときは [GitHub ActionsのToraboビルド](https://github.com/ishiooon/dotfiles/actions/workflows/torabo-zmk.yml) で「Run workflow」を選びます。 3. 成功した実行結果の「Artifacts」から `torabo-tsuki-s-firmware` をダウンロードします。ZIPには右親機・左子機・設定消去用の `.uf2` と、使った依存関係の一覧が入っています。 -ブラウザからの編集・ビルドはMac、Windows、Linuxで同じ手順です。MacのF長押し+Bによるキー一覧にはKarabiner-Elementsが必要です。Torabo本体では `F` 押し込み中の `N` が英数(ABC)、`M` がかな(あいう)です。内蔵キーボードでは Karabiner の `f+n` / `f+m` が同じ役割です。 +ブラウザからの編集・ビルドはMac、Windows、Linuxで同じ手順です。MacのF長押し+Bによるキー一覧にはKarabiner-Elementsが必要です。Torabo本体では `F` 押し込み中の `N` が英数(ABC)、`M` がかな(あいう)です。Macの内蔵JISでは、物理 `e` を保持して `;` で英数、`:` でかなに切り替えます。 ### 手元でビルドする @@ -52,7 +52,7 @@ ZMK Studioで保存した割り当ては再書き込み後も残ります。リ - **予備:** USB接続中にシリアルを1200bpsで開いて閉じる。`ls /dev/tty.usb*` でポートを確認し、`screen /dev/tty.usbmodem… 1200` のあと `Ctrl+a` → `k` → `y`。 - **settings reset 直後など、通常起動しないとき:** マイコンの BOOT と GND をショートしたままUSB接続します。 -Bluetooth接続ではZMK版がキーボードとマウスの両方として認識されます。[Karabinerの設定](../karabiner/karabiner.json)ではToraboを明示的に処理対象にし、F24での一覧表示と、F1〜F12を標準ファンクションキーとして送る処理を行います。ToraboのFを長押ししながらBを押すと、Bを押している間にキー一覧が表示されます。Bluetooth接続で取得できた左右の電池残量は、次回の一覧表示で確認できます。初回はBluetoothの許可が必要な場合があります。 +Bluetooth接続ではZMK版がキーボードとマウスの両方として認識されます。[Karabinerの設定](../karabiner/karabiner.json)ではToraboを明示的に処理対象にし、F24での一覧表示と、F1〜F12を標準ファンクションキーとして送る処理を行います。ToraboのFを長押ししながらBを押すと、Bを押している間にキー一覧が表示されます。Bluetooth接続時は裏で左右の電池残量を読み、**次回**の一覧表示の見出しに出します(例: `右 80% · 左 70%`)。初回は「このMacのBluetoothを許可」などのダイアログが出ることがあり、システム設定 → プライバシーとセキュリティ → Bluetooth で `torabo-battery` や Karabiner-Elements がオンになっている必要があります。USBのみの接続では残量は取れません。 ## Vialに戻すとき diff --git a/README.md b/README.md index c503bbd..ca90d3f 100644 --- a/README.md +++ b/README.md @@ -102,21 +102,26 @@ ln -s ~/dotfiles/.config/mcphub ~/.config/mcphub 導入前確認は `bash .bin/install-janky-borders.sh --dry-run`、導入は `bash .bin/install-janky-borders.sh`、設定変更後の再読み込みは `brew services restart borders` です。 #### 5. Karabiner-Elements のインストール -`d` 押し込み中は `n m , j k l u i o p` が `1-0` になります。`v` 押し込み中は `n m ,` が `, . /`、`j k l u i o p` が `; ' \\ - = [ ]` になります。`f` と同時に押した `hjkl` / `e` はすぐ矢印・Delete になり、長押し後の連続入力にも対応します。`f` + `b` 長押し中だけ、JIS 配列(return 形状含む)の全キーとレイヤー一覧 HUD(JS 実装)を表示します。`英数` / `かな` は短押しで Enter、長押しで ⌘。`f` + `n` で ABC、`f` + `m` で あいう。`space` は短押しでスペース、長押しで Shift です。レイヤー定義は `.config/karabiner/keymap-layers.json`、Karabiner 本体は `.config/karabiner/karabiner.json`、HUD は `.bin/karabiner-keymap-hud` と `.config/karabiner/scripts/keymap-hud.{js,html}` です。HUD は物理 JIS 配列で表示し、常駐デーモン化して `f+b` で即時に出します。英字入力は入力ソース `ABC`(US)を使えます。初回のみ `bash ~/.bin/karabiner-keymap-hud start` でデーモンを起動してください。 -| キー | 動作 | +Macの内蔵JISでは文字キーを上と外側へ移します。以下は移動前の物理キーで書いています。 + +| 物理キー | 動作 | | --- | --- | -| `f` + `h` | ← | -| `f` + `j` | ↓ | -| `f` + `k` | ↑ | -| `f` + `l` | → | -| `f` + `e` | Delete | -| `f` + `m` | キーマップ一覧を表示(押している間) | +| `e` 長押し+ `f` | 内蔵のキー一覧を表示 | +| `e` 長押し+ `o` / `p` / `@` / `[` | 左 / 下 / 上 / 右 | +| `e` 長押し+ `;` / `:` | 英数(ABC)/ かな(あいう) | +| `w` / `d` / `s` / `a` 長押し | 数字 / 記号 / ファンクションキー / メディア | + +内蔵の右かなとスペースは短押しでスペース、長押しでShift。左英数と右Commandは短押しでEnter、長押しでCommand。左CommandはOptionとして使います。Command+Tab中は、Commandを保持したまま物理 `e` と矢印に対応するキーを使います。 -`Command + Tab` 中は、物理の `Command` を維持したまま矢印だけを送るルールを使います。`Command` を押したまま `f` を押し、`hjkl` で移動してください。 +ほかの外付けキーボードでは従来の `f/d/v/c/x` レイヤーを使い、Fを保持してBを押すと外付け用のキー一覧が出ます。Toraboで同じ操作をすると専用のキー一覧が出ます。キー一覧はBに対応するキーを離すと閉じます。 + +内蔵・外付けの表示は [内蔵JISの定義](.config/karabiner/keymap-layers.json) と [外付けのレイヤー定義](.config/karabiner/keymap-layers-external.json) で管理します。[Karabinerの設定](.config/karabiner/karabiner.json) と同じ割り当てを反映してください。 導入前確認は `bash .bin/install-karabiner.sh --dry-run`、導入は `bash .bin/install-karabiner.sh` です。初回はシステム設定で Input Monitoring とアクセシビリティの許可が必要です。許可後に Karabiner-Elements を起動すると設定が有効になります。 +更新前からキー一覧が起動している場合は、`~/.bin/karabiner-keymap-hud stop` で終了します。次の表示操作で新しい定義を読み込みます。 + #### Torabo-tsuki (S) のキーマップ編集 キー割り当てとトラックボール、スリープ設定をリポジトリで管理します。GitHubで設定を編集して保存すると、右親機・左子機のファームウェアが自動でビルドされます。MacのKarabinerで表示するキー一覧にはToraboの配列も含まれます。[編集・ビルド・書き込み手順](.config/torabo-zmk/README.md) diff --git a/tests/karabiner_f_hjkl_config_test.sh b/tests/karabiner_f_hjkl_config_test.sh index 2ef2a51..9a3dbf7 100755 --- a/tests/karabiner_f_hjkl_config_test.sh +++ b/tests/karabiner_f_hjkl_config_test.sh @@ -55,8 +55,8 @@ for layer_id in base f d v c x; do exit 1 fi done -if ! grep -Fq '"z": "z/⌃"' "$LAYERS_FILE"; then - echo "ベースレイヤーに z hold=Control の表示がありません。" >&2 +if ! grep -Fq '"control": "z/⌃"' "$LAYERS_FILE"; then + echo "ベースレイヤーに control tap=z hold=Control の表示がありません。" >&2 exit 1 fi @@ -98,7 +98,8 @@ for expected in \ '"key_code": "up_arrow"' \ '"key_code": "right_arrow"' \ '"key_code": "delete_or_backspace"' \ - 'karabiner-keymap-hud show' \ + 'karabiner-keymap-hud show jis' \ + 'karabiner-keymap-hud show torabo' \ 'karabiner-keymap-hud hide' \ '"mandatory": [' \ 'left_command' \ @@ -113,8 +114,9 @@ for expected in \ 'left_shift' \ 'spacebar' \ '"name": "d_held"' \ + '"key_code": "w"' \ '"key_code": "d"' \ - '"key_code": "comma"' \ + '"key_code": "semicolon"' \ '"key_code": "1"' \ '"key_code": "0"' \ 'd layer' \ @@ -126,7 +128,7 @@ for expected in \ 'x layer' \ '"key_code": "z"' \ 'left_control' \ - 'z hold=Control' \ + 'control tap=z hold=Control' \ '"key_code": "escape"' \ '"key_code": "delete_forward"' \ 'launchpad' \ @@ -143,8 +145,12 @@ for expected in \ done # プロファイルでルールが有効化されていることを確認する。 -if ! grep -Fq 'karabiner-keymap-hud show' "$CONFIG_FILE"; then - echo "Karabiner プロファイルに f+m HUD ルールが有効化されていません。" >&2 +if ! grep -Fq 'karabiner-keymap-hud show jis' "$CONFIG_FILE"; then + echo "Karabiner プロファイルに内蔵向け HUD(show jis)ルールがありません。" >&2 + exit 1 +fi +if ! grep -Fq '"kana": "␣/⇧"' "$LAYERS_FILE" || ! grep -Fq '"command_r": "↩/⌘"' "$LAYERS_FILE"; then + echo "ベースレイヤーに右あいう=␣/⇧・右command=↩/⌘ の表示がありません。" >&2 exit 1 fi if ! grep -Fq 'japanese_eisuu' "$CONFIG_FILE" || ! grep -Fq 'japanese_kana' "$CONFIG_FILE"; then diff --git a/tests/karabiner_hud_device_selection_test.sh b/tests/karabiner_hud_device_selection_test.sh index 9c944b3..8a04dfe 100644 --- a/tests/karabiner_hud_device_selection_test.sh +++ b/tests/karabiner_hud_device_selection_test.sh @@ -73,6 +73,22 @@ expect_display failure show expect_display disconnected show KARABINER_HUD_HIDUTIL="$fixture/見つからない" expect_display usb show +# Mac の f+b 相当(show jis)は Torabo 接続中でもデーモンへは show(JIS)を渡す +HUD_TEST_DEVICES=usb bash "$launcher" show jis +[[ "$(cat "$state_dir/command")" == show ]] || { + echo "show jis が Torabo 接続中でもデーモン向け show になりません。" >&2 + exit 1 +} +HUD_TEST_DEVICES=disconnected bash "$launcher" show torabo +[[ "$(cat "$state_dir/command")" == 'show torabo' ]] || { + echo "show torabo が未接続でも Torabo 指定になりません。" >&2 + exit 1 +} + +# 外付けの旧配列はTorabo接続中でも外付け専用の表示指示を渡す。 +HUD_TEST_DEVICES=usb bash "$launcher" show external +[[ "$(cat "$state_dir/command")" == 'show external' ]] + bash "$launcher" hide [[ "$(cat "$state_dir/command")" == hide ]] [[ "$(bash "$launcher" status)" == 'running pid=12345 cmd=hide' ]] diff --git a/tests/karabiner_hud_torabo_dispatch_test.sh b/tests/karabiner_hud_torabo_dispatch_test.sh index 168a2d7..90f12a2 100644 --- a/tests/karabiner_hud_torabo_dispatch_test.sh +++ b/tests/karabiner_hud_torabo_dispatch_test.sh @@ -16,17 +16,28 @@ let definition = '{"model":"Torabo "}'; sandbox.readText = () => definition; const calls = []; const browser = vm.createContext({ - window: { showKeymap: (profile) => calls.push(profile) }, + window: { showKeymap: (profile, layers) => calls.push({ profile, layers: layers && JSON.stringify(layers) }) }, buildToraboKeymap: (config) => ({ name: config.model }) }); vm.runInContext(sandbox.keymapDisplayScript("show torabo", "torabo-tsuki-s.json"), browser); -assert.deepEqual(calls, ["torabo"]); +assert.equal(calls.at(-1).profile, "torabo"); assert.equal(browser.window.__TORABO_KEYMAP__.name, "Torabo "); vm.runInContext(sandbox.keymapDisplayScript("show", "torabo-tsuki-s.json"), browser); -assert.deepEqual(calls, ["torabo", "jis"]); +assert.equal(calls.at(-1).profile, "jis"); +vm.runInContext(sandbox.keymapDisplayScript("show jis", "torabo-tsuki-s.json"), browser); +assert.equal(calls.at(-1).profile, "jis"); +// 外付けでFを保持した場合は、従来のFレイヤーを内蔵の定義から独立して渡す。 +const external = fs.readFileSync(root + "/.config/karabiner/keymap-layers-external.json", "utf8"); +sandbox.readText = (path) => { + assert.equal(path, "keymap-layers-external.json"); + return external; +}; +vm.runInContext(sandbox.keymapDisplayScript("show external", "torabo-tsuki-s.json"), browser); +assert.deepEqual(calls.at(-1), { profile: "external", layers: JSON.stringify(JSON.parse(external)) }); definition = "設定が壊れている"; +sandbox.readText = () => definition; vm.runInContext(sandbox.keymapDisplayScript("show torabo", "torabo-tsuki-s.json"), browser); -assert.deepEqual(calls, ["torabo", "jis", "jis"]); +assert.equal(calls.at(-1).profile, "jis"); const html = sandbox.buildHtmlDocument("", '{"label":""}', "function buildToraboKeymap() {}"); assert.equal((html.match(/<\/script>/g) || []).length, 2); console.log("成功: 内蔵・Torabo用の表示指示を選び、データ不良時は内蔵表示に戻ります。"); diff --git a/tests/karabiner_layer_shortcuts_test.sh b/tests/karabiner_layer_shortcuts_test.sh index 6a5b845..99ea871 100644 --- a/tests/karabiner_layer_shortcuts_test.sh +++ b/tests/karabiner_layer_shortcuts_test.sh @@ -15,17 +15,24 @@ from pathlib import Path # 数字と記号の出力は、設定ファイルの値ではなく利用者向けのキー配列から定義する。 LAYER_OUTPUTS = { - "d": { - "n": "1", "m": "2", "comma": "3", "j": "4", "k": "5", - "l": "6", "u": "7", "i": "8", "o": "9", "p": "0", + # 内蔵キーボードのレイヤーは、移動後の文字の位置から開く。 + "w": { + "semicolon": "1", "quote": "2", "backslash": "3", "p": "4", "open_bracket": "5", + "close_bracket": "6", "hyphen": "7", "equal_sign": "8", "international3": "9", + "return_or_enter": "0", }, - "v": { - "n": "comma", "m": "period", "comma": "slash", "j": "semicolon", - "k": "quote", "l": "backslash", "u": "hyphen", "i": "equal_sign", - "o": "open_bracket", "p": "close_bracket", "h": "grave_accent_and_tilde", - "y": "international3", + "d": { + "semicolon": "comma", "quote": "period", "backslash": "slash", "p": "semicolon", + "open_bracket": "quote", "close_bracket": "backslash", "hyphen": "hyphen", + "equal_sign": "equal_sign", "international3": "open_bracket", + "return_or_enter": "close_bracket", "o": "grave_accent_and_tilde", + "0": "international3", }, } +BUILT_IN = {"is_built_in_keyboard": True, "is_keyboard": True} +EXTERNAL = {"is_built_in_keyboard": False, "is_keyboard": True} +TORABO = {**EXTERNAL, "vendor_id": 65261, "product_id": 48301} +LOGICAL_HOLDS = {"e": "f", "w": "d", "d": "v", "s": "c", "a": "x"} SIDED_MODIFIERS = ("command", "control", "option", "shift") ACCEPTED_MODIFIERS = ( (), ("caps_lock",), ("left_shift",), ("right_shift",), @@ -47,13 +54,63 @@ def main(): for layer, outputs in LAYER_OUTPUTS.items(): for key, output in outputs.items(): verify_chord(manipulators, layer, key, output) - print("成功: d/v の同時押しで数字と記号を入力でき、通常のショートカットも維持されます。") + verify_device_scope(manipulators) + verify_command_layer(manipulators) + print("成功: キーボードごとにレイヤーが適用され、通常のショートカットとアプリ切り替えを保ちます。") + + +def verify_device_scope(manipulators): + # 違うキーボードを併用しても、通常入力と右 Shift の左隣の出力が混ざらない。 + for device, expected in ((BUILT_IN, ("q", "p", "vk_none")), (EXTERNAL, ("1", "return_or_enter", "hyphen")), + (TORABO, ("1", "return_or_enter", "international1"))): + for key, output in zip(("1", "return_or_enter", "international1"), expected): + match = first_match(manipulators, (key,), device) + assert (key_codes(match) or [key]) == [output], (device, key, output) + + for key, logical in LOGICAL_HOLDS.items(): + for modifier in ("left_control", "left_option", "right_command"): + match = first_match(manipulators, (key,), BUILT_IN, (modifier,)) + outputs = key_codes(match) or [event["key_code"] for event in match.get("to_if_alone", [])] + assert outputs == [logical], f"{modifier}+{key} で論理配置の {logical} を入力できません。" + assert key_codes(first_match(manipulators, ("d", "n"), EXTERNAL)) == ["1"] + assert key_codes(first_match(manipulators, ("v", "n"), EXTERNAL)) == ["comma"] + assert not first_match(manipulators, ("w", "semicolon"), EXTERNAL) + assert not first_match(manipulators, ("d", "n"), TORABO) + external_hold = variable_values(first_match(manipulators, ("d",), EXTERNAL)) + internal_hold = variable_values(first_match(manipulators, ("w",), BUILT_IN)) + assert key_codes(first_match(manipulators, ("semicolon",), BUILT_IN, variables=external_hold)) == ["n"] + assert not first_match(manipulators, ("n",), EXTERNAL, variables=internal_hold) + + +def verify_command_layer(manipulators): + # 右 Command を先に押してから移動レイヤーに入ると、矢印と逆方向のアプリ切り替えが使える。 + right_command = first_match(manipulators, ("right_command",), BUILT_IN) + right_command_state = variable_values(right_command) + assert key_codes(right_command) == ["right_command"] + assert right_command["to_if_alone"] == [{"key_code": "return_or_enter"}] + for modifiers in ((), ("right_command",)): + hold = first_match(manipulators, ("e",), BUILT_IN, modifiers, right_command_state) + active = {**right_command_state, **variable_values(hold)} + arrow = first_match(manipulators, ("o",), BUILT_IN, modifiers, active) + assert key_codes(arrow) == ["left_arrow"] + switch = first_match(manipulators, ("tab",), BUILT_IN, modifiers, active) + assert switch["to"] == [{"key_code": "tab", "modifiers": ["left_command"]}] + space = first_match(manipulators, ("spacebar",), BUILT_IN, modifiers, active) + assert key_codes(space) == ["left_shift"] and "to_if_alone" not in space + kana = first_match(manipulators, ("japanese_kana",), BUILT_IN, modifiers, active) + assert kana["to_if_alone"] == [{"key_code": "spacebar"}] + for shift in (space, kana): + backwards = first_match(manipulators, ("tab",), BUILT_IN, modifiers, + {**active, **variable_values(shift)}) + assert backwards["to"] == [{"key_code": "tab", "modifiers": ["left_command", "left_shift"]}] + chord = first_match(manipulators, ("e", "o"), BUILT_IN, ("right_command",), allow_first_key=True) + assert key_codes(chord) == ["left_arrow"], "Command と移動レイヤーの同時押しが単独の保持より先に必要です。" def verify_chord(manipulators, layer, key, output): # Shift の記号入力を維持し、左右の Command、Control、Option では同時押しを変換しない。 expected = {"key_code": output} - if (layer, key) == ("v", "h"): + if (layer, key) == ("d", "o"): expected["modifiers"] = ["left_shift"] for modifiers in ACCEPTED_MODIFIERS: result = chord_outputs(manipulators, (layer, key), modifiers) @@ -70,15 +127,45 @@ def verify_chord(manipulators, layer, key, output): def chord_outputs(manipulators, keys, modifiers): - # キーが順に押されて重なった場合に一致するルールについて、変数設定を除いたキー出力を求める。 - chord = tuple(keys) - for manipulator in manipulators: - source = manipulator["from"] - inputs = tuple(event.get("key_code") for event in source.get("simultaneous", ())) - if inputs != chord or not modifiers_match(source.get("modifiers", {}), modifiers): + match = first_match(manipulators, keys, BUILT_IN, modifiers) + return [event for event in match.get("to", []) if "key_code" in event] + + +def first_match(manipulators, keys, device, modifiers=(), variables=None, allow_first_key=False): + # Karabiner と同じ順序で条件を照合し、必要に応じて同時押しの先頭キーも候補にする。 + for entry in manipulators: + source = entry["from"] + inputs = tuple(event["key_code"] for event in source.get("simultaneous", ())) + if not inputs: + inputs = (source.get("key_code"),) + if inputs not in (keys, keys[:1] if allow_first_key else keys): continue - return [event for event in manipulator["to"] if "key_code" in event] - return [] + if modifiers_match(source.get("modifiers", {}), modifiers) and conditions_match(entry, device, variables or {}): + return entry + return {} + + +def conditions_match(entry, device, variables): + for condition in entry.get("conditions", []): + kind = condition["type"] + if kind in ("device_if", "device_unless"): + found = any(all(device.get(key) == value for key, value in identifier.items() if key != "description") + for identifier in condition["identifiers"]) + elif kind in ("variable_if", "variable_unless"): + found = variables.get(condition["name"], 0) == condition["value"] + else: + raise AssertionError(f"未対応の条件 {kind}") + if found != kind.endswith("_if"): + return False + return True + + +def key_codes(entry): + return [event["key_code"] for event in entry.get("to", []) if "key_code" in event] + + +def variable_values(entry): + return {item["name"]: item["value"] for event in entry.get("to", []) if (item := event.get("set_variable"))} def modifiers_match(specification, modifiers): diff --git a/tests/karabiner_torabo_battery_test.sh b/tests/karabiner_torabo_battery_test.sh index 9d34d02..3d4d2e7 100644 --- a/tests/karabiner_torabo_battery_test.sh +++ b/tests/karabiner_torabo_battery_test.sh @@ -20,26 +20,42 @@ printf 'idle\n' >"$state/command" export HUD_TEST_PROCESS="/usr/bin/osascript -l JavaScript $root/.config/karabiner/scripts/keymap-hud.js daemon $root/.config/karabiner/scripts/keymap-hud.html $root/.config/karabiner/keymap-layers.json $state/daemon.pid $state/command" # 起動済みのHUDと遅いコンパイラーを模擬し、macOSの画面や実機には触れない。 -cat >"$BASH_ENV" <<'SH' -kill() { [[ "$*" == '-0 12345' ]]; } -ps() { printf '%s\n' "$HUD_TEST_PROCESS"; } -function /usr/bin/swiftc() { - local last="" - for last; do :; done - printf 'compile\n' >>"$HUD_TEST_FIXTURE/compilations" - for attempt in {1..100}; do - [[ ! -d "$HUD_TEST_FIXTURE" ]] && return 1 - [[ -f "$HUD_TEST_FIXTURE/release" ]] && break - sleep 0.05 - done - [[ -f "$HUD_TEST_FIXTURE/release" ]] || return 1 - cat >"$last" <<'READER' +# 絶対パス呼び出しを避けるため、swiftc / codesign は PATH 上のスタブにする。 +mkdir -p "$fixture/bin" +cat >"$fixture/bin/swiftc" <<'SH' +#!/usr/bin/env bash +set -euo pipefail +# -o の直後だけを出力先にする(末尾の Info.plist 引数と取り違えない)。 +out="" +prev="" +for arg; do + if [[ "$prev" == "-o" ]]; then out="$arg"; fi + prev="$arg" +done +[[ -n "$out" ]] || exit 1 +printf 'compile\n' >>"$HUD_TEST_FIXTURE/compilations" +for attempt in {1..100}; do + [[ ! -d "$HUD_TEST_FIXTURE" ]] && exit 1 + [[ -f "$HUD_TEST_FIXTURE/release" ]] && break + sleep 0.05 +done +[[ -f "$HUD_TEST_FIXTURE/release" ]] || exit 1 +cat >"$out" <<'READER' #!/usr/bin/env bash printf 'read\n' >>"$HUD_TEST_FIXTURE/reads" printf '%s\n' '{"right":80,"left":30}' READER - chmod +x "$last" -} +chmod +x "$out" +SH +cat >"$fixture/bin/codesign" <<'SH' +#!/usr/bin/env bash +exit 0 +SH +chmod +x "$fixture/bin/swiftc" "$fixture/bin/codesign" +export PATH="$fixture/bin:$PATH" +cat >"$BASH_ENV" <<'SH' +kill() { [[ "$*" == '-0 12345' ]]; } +ps() { printf '%s\n' "$HUD_TEST_PROCESS"; } SH cat >"$KARABINER_HUD_HIDUTIL" <<'SH' #!/usr/bin/env bash diff --git a/tests/karabiner_torabo_hud_test.sh b/tests/karabiner_torabo_hud_test.sh index e45db7b..8a0fad6 100644 --- a/tests/karabiner_torabo_hud_test.sh +++ b/tests/karabiner_torabo_hud_test.sh @@ -84,6 +84,15 @@ assert.match(heading.textContent, /JIS/); assert.equal(layers.children.length, 6, '切断後はJISの base/f/d/v/c/x レイヤーへ戻る'); assert.ok(body.classes.has('jis-keymap-compact'), 'JISに戻ると6層用の寸法に戻る'); +// 外付けでは従来のFレイヤーを描き、次に内蔵を開くと移動後のEレイヤーへ戻る。 +const external = JSON.parse(fs.readFileSync(path.join(process.argv[2], 'keymap-layers-external.json'), 'utf8')); +assert.equal(window.showKeymap('external', external), 'external'); +assert.match(heading.textContent, /外付け/); +assert.equal(layers.children.length, 6); +assert.match(layers.children[1].children[0].children[0].textContent, /f 押し込み中/); +assert.equal(window.showKeymap('jis'), 'jis'); +assert.match(layers.children[1].children[0].children[0].textContent, /e 押し込み中/); + const manyLayers = openKeymap({ ...options, layers: Array.from({ length: 16 }, (_, index) => ({ name: `レイヤー${index}`, bindings: { left: '<設定>', right: 'F12' }, })) }); diff --git a/tests/karabiner_torabo_shortcut_test.sh b/tests/karabiner_torabo_shortcut_test.sh index 5692165..7b4b5e6 100644 --- a/tests/karabiner_torabo_shortcut_test.sh +++ b/tests/karabiner_torabo_shortcut_test.sh @@ -22,9 +22,8 @@ shortcut = external[0] assert shortcut["conditions"] == [{"type": "device_if", "identifiers": [ {"vendor_id": 65261, "product_id": 48301, "is_keyboard": True} ]}], "Torabo 以外にも表示用キーが適用されています。" -assert shortcut["to"][0]["shell_command"].endswith("keymap-hud show'") +assert shortcut["to"][0]["shell_command"].endswith("keymap-hud show torabo'") assert shortcut["to_after_key_up"][0]["shell_command"].endswith("keymap-hud hide'") -assert any(m["from"].get("key_code") == "b" and m.get("to", [{}])[0].get("shell_command", "").endswith("keymap-hud show'") for m in changes) # ZMK ではキー入力とカーソル操作が一つの機器として届くため、両方を Karabiner で受け取る。 torabo_identifiers = { @@ -56,17 +55,31 @@ for manipulator in changes: continue assert excludes_torabo(manipulator), "Torabo 向け以外の Karabiner 変換が Torabo にも掛かっています。" +def applies_to_keyboard(manipulator, built_in): + identifiers = {"is_built_in_keyboard": built_in, "is_keyboard": True} + for condition in manipulator.get("conditions", []): + if condition["type"] not in ("device_if", "device_unless"): + continue + found = any(all(identifiers.get(name) == value for name, value in candidate.items() + if name != "description") for candidate in condition["identifiers"]) + if found != (condition["type"] == "device_if"): + return False + return True + +# 内蔵からは移動後の JIS 配列を開き、外付けからは従来の配列を開く。 +for built_in, chord_key, mode in [(True, "f", "jis"), (False, "b", "external")]: + hud = [m for m in changes if m["from"].get("key_code") == chord_key and applies_to_keyboard(m, built_in) + and any(event.get("shell_command", "").endswith(f"keymap-hud show {mode}'") for event in m.get("to", []))] + assert len(hud) == 1, f"キーボードに対して {mode} の HUD を開くルールが必要です。" + # 右 Shift の左隣のキーは、Torabo ではファームウェアの割り当てをそのまま使う。 assert not any(m["from"].get("key_code") == "international1" for m in active.get("simple_modifications", [])), ( "全キーボードに適用されるハイフン変換が Torabo の INTERNATIONAL_1 を上書きしています。" ) -hyphen = [m for m in changes if m["from"].get("key_code") == "international1"] -assert len(hyphen) == 1 and excludes_torabo(hyphen[0]) and hyphen[0]["to"] == [{"key_code": "hyphen"}], ( - "Torabo 以外で右 Shift の左隣のキーがハイフンに変換されません。" -) -assert not any(c["type"] == "device_if" for c in hyphen[0]["conditions"]), ( - "右 Shift の左隣のキーの変換に追加の機種制限があります。" -) +for built_in, expected in [(True, "vk_none"), (False, "hyphen")]: + outputs = [m["to"] for m in changes if m["from"].get("key_code") == "international1" + and applies_to_keyboard(m, built_in)] + assert outputs == [[{"key_code": expected}]], "右 Shift の左隣のキーがキーボードごとの割り当てと合いません。" fkeys_setting = "system.use_fkeys_as_standard_function_keys" @@ -87,18 +100,27 @@ def check_function_key(manipulators, key, source): and matches_fkeys_setting(event.get("conditions", []), standard_fkeys)] assert outputs == [(key, modifiers)], f"{source}: {key} の出力が macOS の設定 {standard_fkeys} と合いません。" -# Torabo の標準 F キーと、他のキーボードの C レイヤーでの二通りの押し方を確認する。 -c_layer_keys = ["n", "m", "comma", "j", "k", "l", "u", "i", "o", "p", "h", "y"] -for number, c_layer_key in enumerate(c_layer_keys, 1): +# Torabo 本体から送る F キーは、macOS の設定に関わらずそのまま使う。 +for number in range(1, 13): fkey = f"f{number}" check_function_key([m for m in changes if targets_torabo_only(m) and m["from"].get("key_code") == fkey], fkey, "Torabo") - check_function_key([m for m in changes if m["from"].get("key_code") == c_layer_key - and any(c.get("name") == "c_held" and c["type"] == "variable_if" and c["value"] is True - for c in m.get("conditions", []))], fkey, "C を先に長押し") - check_function_key([m for m in changes if m["from"].get("simultaneous") == [ - {"key_code": "c"}, {"key_code": c_layer_key} - ]], fkey, "C と対象キーを続けて押す") + +# 論理 C の位置は内蔵と外付けで異なり、どちらでも長押し・同時押しで標準 F キーを使える。 +for built_in, hold, targets in [ + (True, "s", ["semicolon", "quote", "backslash", "p", "open_bracket", "close_bracket", + "hyphen", "equal_sign", "international3", "return_or_enter", "o", "0"]), + (False, "c", ["n", "m", "comma", "j", "k", "l", "u", "i", "o", "p", "h", "y"]), +]: + scoped = [m for m in changes if applies_to_keyboard(m, built_in)] + for number, target in enumerate(targets, 1): + fkey = f"f{number}" + check_function_key([m for m in scoped if m["from"].get("key_code") == target + and any(c["type"] == "variable_if" and c.get("name", "").endswith("c_held") + for c in m.get("conditions", []))], fkey, "C を先に長押し") + check_function_key([m for m in scoped if m["from"].get("simultaneous") == [ + {"key_code": hold}, {"key_code": target} + ]], fkey, "C と対象キーを続けて押す") print("成功: キー一覧、ハイフン、標準ファンクションキーのキーボード別設定を確認しました。") PY