LoginSignup
5
2

More than 5 years have passed since last update.

【Mac】使わないキーの有効活用(caps, 英数, right_command, left_shift)

Last updated at Posted at 2018-10-20

やること

  • あまり使用していないキーを見つけて、よく使用するショートカットを割り当てる

環境

  • MacBook 12インチ
  • JIS配列

使用アプリケーション

  • Karabiner-Elements
    • キー配置をカスタムするためのアプリケーション

お持ちでない方はhomebrew使ってこんなかんじで導入してください

$brew cask install karabiner-elements

image.png

キー選び

未使用キーを探す

keyboard.jpg

つ発見!
左右に有るキーはどうやら片方しか使っていないようだ
keyboard.jpg

  • caps lock
  • 英数(自分はかなキーをトグルに変更している)
  • right_command
  • right_shift

割り当てるショートカット

よく使うがコマンドが面倒だなと思うものを4つ挙げた

説明 コマンド コメント img
バー右上へ control + F8 wifi選ぶ時、フルスクリーン時の時間確認で使用(F8が遠い) image.png
Dockアクセス control + F3 最短ではないがよく使う(ctrl とF3を同時に触るのは疲れる) image.png
launchpad fn+f4 ファンクションを入れ替えているため2キー image.png
terminal 割当なし よく使うのでワンタッチだと嬉しい image.png

Karabiner−Elementsを使用して割り当てる

設定の流れ

  1. 設定ファイルを用意する
  2. 設定ファイルをしかるべき場所に保存する
  3. アプリケーションから割当を適用

設定ファイルを用意する

  • バー(右上へ)→right_shift
  • Dockアクセス→caps lock
my_keybind1.json
{
    "title": "ctrl+function",
    "rules": [
        {
            "description": "ctrl+F8(右上)→right_shift",
            "manipulators": [
                {
                    "from": {
                        "key_code": "right_shift"
                    },
                    "to": [
                        {
                            "key_code": "f8",
                            "modifiers": "left_control"
                        }
                    ],
                    "type": "basic"
                }
            ]
        },
        {
            "description": "ctrl+f3(dock)→caps",
            "manipulators": [
                {
                    "from": {
                        "key_code": "caps_lock"
                    },
                    "to": [
                        {
                            "key_code": "f3",
                            "modifiers": "left_control"
                        }
                    ],
                    "type": "basic"
                }
            ]
        }

    ]
}
  • ターミナル起動→right_command
    • 自分はiterm2を起動
my_keybind2.json
{
    "title": "open app",
    "rules": [
        {
            "description": "iTerm2→right_command",
            "manipulators": [
                {
                    "from": {
                        "key_code": "right_command"
                    },
                    "to": [
                        {
                            "shell_command": "open -a iTerm.app"
                        }
                    ],
                    "type": "basic"
                }
            ]
        }
    ]
}

設定ファイルを保存する

以下に設定ファイル(json)を置く

 ~/.config/karabiner/assets/complex_modifications/

アプリケーションから割当を適用

launchpad→英数

  • Simple Modifications→add rule Screen Shot 2018-10-20 at 8.59.27.png
  • lang2(英数)→launchpad Screen Shot 2018-10-20 at 8.58.45 copy.png

その他の割当

  • Complex Modifications->add rule

Screen Shot 2018-10-19 at 16.21.16.png
2.追加したい機能をEnable
Screen Shot 2018-10-19 at 16.24.19.png
Screen Shot 2018-10-19 at 16.24.34.png

おまけ:かなをトグルに

For Japanese (日本語環境向けの設定)(rev 3)を利用
Screen Shot 2018-10-20 at 9.04.31.png
Screen Shot 2018-10-20 at 9.04.40 copy.png
Screen Shot 2018-10-20 at 9.05.10.png
Screen Shot 2018-10-20 at 9.07.21.png

参考

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2