3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OSXでキーボードでアプリケーションの切り替え

3
Last updated at Posted at 2014-10-24

英数、かなキーを使って切り替える

OSXでキーボードでアプリケーションの切り替えをする場合は⌘+TAB ⌘+Shift+TAB

慣れればいいのかもしれないけど、さっと使うには面倒臭い、特にShiftを使った逆順の方はとっさに使えるものではない

⌘+TABCTRL+TABにマッピングしたりもしてたのだけど、これもやっぱり使いづらい

ってことで、CTRL+英数CTRL+かなでアプリケーションを切り替えるようにしてみた

Macの純正キーボードではないPCキーボードを使っている場合はCTRL+無変換CTRL+変換

PCキーボードを使う場合はこれ以前にSeil(旧称PCKeyboardHack)でCTRLキーとCapsLockを入れ替えて使っているので、正確に言うとCapsLock+無変換CapsLock+変換で使っている

キー変換アプリであるKarabiner-Elementを利用する
~/.config/karabiner/karabiner.jsonの中のprofiles->complex_modifications->rulesに以下を追加

karabiner.json
{
    "description": "Change Apps By HENKAN",
    "manipulators": [
        {
            "from": {
                "key_code": "japanese_kana",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "tab",
                    "modifiers": [
                        "left_command"
                    ]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "japanese_eisuu",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "tab",
                    "modifiers": [
                        "left_command",
                        "left_shift"
                    ]
                }
            ],
            "type": "basic"
        }
    ]
},

旧情報 Karabiner(旧称KeyRemap4Macbook)のprivate.xml機能を使って以下のように記述

private.xml
<?xml version="1.0"?>
<root>
  <item>
    <name>Change APPs</name>
    <appendix>Change APPs by Eisuu and Kana</appendix>
 <identifier>private.change_apps</identifier>
    <autogen>--KeyToKey-- KeyCode::JIS_KANA, VK_CONTROL, KeyCode::TAB, VK_COMMAND</autogen>
    <autogen>--KeyToKey-- KeyCode::JIS_EISUU, VK_CONTROL, KeyCode::TAB, VK_COMMAND | VK_SHIFT</autogen>
  </item>
</root>

とても快適です
private.xmlの使い方は省略
karabiner.jsonの詳細についてはこちらを参照

3
3
3

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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?