Last active
June 8, 2018 03:14
-
-
Save tkatochin/8bf52d722c15644c4968a99e0673ca62 to your computer and use it in GitHub Desktop.
macで英字キーボードのコマンドキーだけで英数←→かなをトグルで切り替える ref: https://qiita.com/tkatochin/items/049f02d3552382f15b75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "For Japanese (日本語環境向けの設定) by tkatochin", | |
"rules": [ | |
{ | |
"description": "コマンドキー(左右どちらでも)を単体で押したときに、英数・かなをトグルで切り替える。", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "ja" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_eisuu" | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "en" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_kana" | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "ja" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "right_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_eisuu" | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "en" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "right_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_kana" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
... | |
"rules": [ | |
... | |
{ | |
"description": "コマンドキー(左右どちらでも)を単体で押したときに、英数・かなをトグルで切り替える。", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "ja" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_eisuu" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "en" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_kana" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "ja" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "right_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_eisuu" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "en" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "right_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_command", | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_kana" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
... | |
] | |
}, | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment