けんすうさんが分割キーボードをお勧めしていたので、分割キーボードを買いました。購入したキーボードはMistel Barocco MD600v3 RGB Classic Black 英語US配列 62キー ブラック Cherry MX RGB 茶軸 MD600-BUSPDAAT3というものです。
キーマッピングを設定すると使いやすくなったので、Karabinerの設定を公開します。
設定スクリプト
{
"description": "New Rule (left_option to command)",
"manipulators": [
{
"from": {
"key_code": "spacebar",
"modifiers": {
"optional": [
"any"
]
}
},
"parameters": {
"basic.to_if_held_down_threshold_milliseconds": 10
},
"to_after_key_up": [
{
"set_variable": {
"name": "spacebar",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "spacebar"
}
],
"to_if_held_down": [
{
"set_variable": {
"name": "spacebar",
"value": 1
}
}
],
"type": "basic"
},
{
"from": {
"key_code": "escape",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_option",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_option"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "u",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_or_backspace"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "o",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "return_or_enter"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "d",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
],
"type": "basic"
},
{
"from": {
"key_code": "right_control",
"modifiers": {
"mandatory": [
"left_shift"
]
}
},
"to": [
{
"key_code": "international1",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "right_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "international3"
}
],
"type": "basic"
}
]
}
設定の詳細
スペースバーの挙動変更:
- 単独で押された場合: 通常のスペースバーの機能を実行。
- 長押しした場合: 変数spacebarを1に設定。
- キーから手を離した後: 変数spacebarを0にリセット。
修飾キーのリマッピング:
-
Escapeキーを左Controlキーに変更:
- Escapeキーが押された時に左Controlの機能を実行。
-
左Optionキーを左Commandキーに変更:
- 左Optionキーが押された時に左Commandの機能を実行。
-
左Controlキーを左Commandキーに変更:
- 左Controlキーが押された時に左Commandの機能を実行。
-
左Commandキーを左Optionキーに変更:
- 左Commandキーが押された時に左Optionの機能を実行。
Spacebarがアクティブな時のカーソル制御:
- Jキーで左矢印: 左に移動。
- Lキーで右矢印: 右に移動。
- Kキーで下矢印: 下に移動。
- Iキーで上矢印: 上に移動。
- Uキーでバックスペース: 削除。
- Oキーでエンターキー: 入力確定。
- DキーでDelete Forward: 前方削除。
右Controlキーの特殊な用途:
- Shiftを押しながら右Controlを押すと、アンダーバーをShiftと共に発火。
- 右Control単独で押すと、¥キーを入力。
というわけで
Windowsでの設定も作成したので、Windowsユーザーの方はそちらをご覧ください。
https://qiita.com/tiger98/items/73c2f0f7e3e9a25f5260