キーのリマッピング for macOS

Karabiner-Elementsの定義ファイルをバックアップしたので貼っておこー 

Ctrl + 矢印キー:矢印キー5回連打*
Ctrl + iキー :上キー*
Ctrl + kキー :下キー*
Ctrl + jキー :左キー*
Ctrl + lキー :右キー*
Ctrl + uキー :Homeキー*
Ctrl + oキー :Endキー*
Ctrl + hキー :BackSpace*
Alt + 1キー :アクティブ画面左寄せ
Alt + 2キー :アクティブ画面中央寄せ
Alt + 3キー :アクティブ画面右寄せ
Alt + qキー :アクティブ画面左上寄せ
Alt + aキー :アクティブ画面左下寄せ
Alt + wキー :アクティブ画面右上寄せ
Alt + sキー :アクティブ画面右下寄せ
Ctrl + F10 :音量ミュート
Ctrl + F11 :音量Down
Ctrl + F12 :音量UP

*:Karabinerで定義

Karabiner-Elements

https://karabiner-elements.pqrs.org

Karabiner-Elements Settings画面

Exchange control + arrow key to 5 arrow keys
{
    "description": "Exchange control + arrow key to 5 arrow keys",
    "manipulators": [
        {
            "from": {
                "key_code": "right_arrow",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "right_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "right_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "right_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "right_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "left_arrow",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "left_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "left_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "left_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "left_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "up_arrow",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "up_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "up_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "up_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "up_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "down_arrow",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "down_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "down_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "down_arrow",
                    "modifiers": []
                },
                {
                    "key_code": "down_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        }
    ]
}
Exchange control + h key to backspace key
{
    "description": "Exchange control + h key to backspace key",
    "manipulators": [
        {
            "from": {
                "key_code": "h",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "delete_or_backspace",
                    "modifiers": []
                }
            ],
            "type": "basic"
        }
    ]
}
Exchange control + ikjl key to arrow key
{
    "description": "Exchange control + ikjl key to arrow key",
    "manipulators": [
        {
            "from": {
                "key_code": "i",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "j",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "l",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": []
                }
            ],
            "type": "basic"
        }
    ]
}
Exchange control + uo key to home end key
{
    "description": "Exchange control + uo key to home end key",
    "manipulators": [
        {
            "from": {
                "key_code": "u",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "home",
                    "modifiers": []
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "o",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "end",
                    "modifiers": []
                }
            ],
            "type": "basic"
        }
    ]
}

Rectangle

https://rectangleapp.com

アクティブ画面の移動は、Rectangleを使っていた。

Hammerspoon

https://www.hammerspoon.org

Hammerspoonでスクリプトを書くとAutoHotkeyと同じようなことができる。知らんけど。


Comments

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です