Friday 14 September 2012

MacbookAirのUSキーボード用のKeyRemap設定メモ

新しいMacbookAir11インチがやってきたんだけど、USキーボードが使いづらくてホント凹んだ。
Returnキー小さすぎ。チルダ(~)が遥か彼方にある。
スペースキーが無駄に大きくてコマンドが両端に寄りすぎ。
Ctrlが変な位置にあってホームポジション崩れるetc。

とりあえずは最低限必要な部分だけでもと、じこじことKeyMapを調整したですよ。

PCKeyboardHack設定
- CapsLockをControl_Right(keycode:62)に設定


KeyRemap4Macbook設定

<デフォルトのremapping設定>
- Change F1..F19Key... (Use these setting...) > SnowLeopard以外全部チェック
- Change Option_R Key > Option_R to Fn
- Custom Shortcuts > Hold Command+Q to Quit Apps

<private.xml設定>

<?xml version="1.0"?>
<root>

    <!-- Option_R を Fn に割り当て -->
    <item>
        <name>Option_R to FN</name>
        <identifier>remap.optionr2f13</identifier>
        <autogen>
            --KeyToKey-- KeyCode::OPTION_R, KeyCode::FN,
        </autogen>
    </item>

    <!-- Option_L 二度押しを Dictation/Speech に割り当て -->
    <item>
        <name>Option_l x2 to Dictation / Speech </name>
        <identifier>remap.optionloptionl2commandoptionshiftf9</identifier>
        <autogen>
            --DoublePressModifier-- KeyCode::OPTION_L, KeyCode::OPTION_L,
            KeyCode::F9, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L |
            ModifierFlag::SHIFT_L
        </autogen>
    </item>

    <!-- Shift_R 二度押しを MissionControlのデスクトップ表示に割り当て -->
    <item>
        <name>Shift_R x2 to F13 (Mission Control: Desktop) </name>
        <identifier>remap.shiftrshiftr2f13</identifier>
        <autogen>
            --DoublePressModifier-- KeyCode::SHIFT_R, KeyCode::SHIFT_R,
            KeyCode::F13
        </autogen>
    </item>

    <!-- Fn 二度押しを 通知センター に割り当て -->
    <item>
        <name>FN x2 to Notification </name>
        <identifier>remap.fnfn2notification</identifier>
        <autogen>
            --DoublePressModifier-- KeyCode::FN, KeyCode::FN,
            KeyCode::F12, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L |
            ModifierFlag::CONTROL_R | ModifierFlag::SHIFT_R
        </autogen>
    </item>

    <!-- Ctrl_L 二度押しで画面の白黒反転(夜作業用とかに) -->
    <item>
        <name>Control_R x2 to Command+Ctrl+Shift+8 </name>
        <identifier>remap.ctrlctrl2commandoptionshift8</identifier>
        <autogen>
            --DoublePressModifier-- KeyCode::CONTROL_L, KeyCode::CONTROL_L,
            KeyCode::KEY_8, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L |
            ModifierFlag::CONTROL_R
        </autogen>
    </item>

    <!-- Shift+Ctrl_R(元CapsLock) でシフトロックのトグルにする -->
    <!-- CapsLockはPCKeyboardHackでCtrl_Rに変更済 -->
    <item>
        <name>Shift+Control_R to CapsLock</name>
        <identifier>remap.shiftcontrolr2capslock</identifier>
        <autogen>--KeyToKey-- KeyCode::CONTROL_R, VK_SHIFT, KeyCode::CAPSLOCK</autogen>
    </item>

    <!-- Ctrl_L 二度押しを ESCAPE に割り当て -->
    <item>
        <name>Ctrl_R x2 to Escape </name>
        <identifier>remap.ctrlrctlr2escape</identifier>
        <autogen>
            --DoublePressModifier-- KeyCode::CONTROL_R, KeyCode::CONTROL_R,
            KeyCode::ESCAPE
        </autogen>
    </item>

    <!-- Control+Space を SPOTLIGHT に割り当て & 同時に半角英数に切り替え -->
    <!-- Spotlightの起動ショートカットは環境設定でCommand+Option+Shift+F12に設定 -->
    <!-- SublimeTextの自動補完と干渉するんだけど、SublimeCodeIntel使ってるから今のところ大丈夫かな? -->
    <!-- 一応、一個下のコマンド2度押しも実験的に導入して、しばらく様子見ね -->
    <item>
        <name>Control_Left + Space to SPOTLIGHT and EISUU2</name>
        <identifier>remap.ctrl2spotlighteisuu</identifier>
        <autogen>
            --KeyToKey-- KeyCode::SPACE, VK_CONTROL,
            KeyCode::F12, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
            KeyCode::JIS_EISUU</autogen>
    </item>

    <!-- Command_L 二度押しで SPOTLIGHT をトグル & 同時に半角英数に切り替え -->
    <!-- Spotlightの起動ショートカットは環境設定でCommand+Option+Shift+F12に設定 -->
    <item>
        <name>Command_Left x2 to SPOTLIGHT and EISUU2</name>
        <identifier>remap.commandlcommandl2spotlighteisuu</identifier>
        <autogen>
            --DoublePressModifier-- KeyCode::COMMAND_L, KeyCode::COMMAND_L,
            KeyCode::F12, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
            KeyCode::JIS_EISUU</autogen>
    </item>

    <!-- Command_R 二度押しで TotalTerminal をトグル & 同時に半角英数に切り替え -->
    <item>
        <name>Command_Right x2 to TotalTerminal and EISUU2</name>
        <identifier>remap.commandr2terminaleisuu</identifier>
        <autogen>
            --DoublePressModifier-- KeyCode::COMMAND_R, KeyCode::COMMAND_R,
            KeyCode::F11, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
            KeyCode::JIS_EISUU
        </autogen>
    </item>

    <!-- スペース+他のキーでコマンドとして機能するように変更 -->
    <!-- スペース単発クリックだとスペースとして機能するよ -->
    <item>
        <name>Space to Command_L</name>
        <appendix>(+ When you type Space only, send Space) + [KeyRepeat]</appendix>
        <identifier>remap.space2commandL_space_keyrepeat</identifier>
        <autogen>
            --KeyOverlaidModifierWithRepeat-- KeyCode::SPACE, KeyCode::COMMAND_L,
            KeyCode::SPACE
        </autogen>
    </item>

    <!-- ファイダーでファイル選択したりフォルダ階層移動するのにCtrl+n/p/f/b を有効にする -->
    <appdef>
        <appname>FINDER</appname>
        <equal>com.apple.finder</equal>
    </appdef>
    <item>
        <name>Ctrl+P to UP when Finder is active</name>
        <identifier>remap.ctrlp2up</identifier>
        <only>FINDER</only>
        <autogen>--KeyToKey-- KeyCode::P, VK_CONTROL, KeyCode::CURSOR_UP</autogen>
    </item>
    <item>
        <name>Ctrl+N to DOWN when Finder is active</name>
        <identifier>remap.ctrln2down</identifier>
        <only>FINDER</only>
        <autogen>--KeyToKey-- KeyCode::N, VK_CONTROL, KeyCode::CURSOR_DOWN</autogen>
    </item>
    <item>
        <name>Ctrl+F to RIGHT when Finder is active</name>
        <identifier>remap.ctrlf2right</identifier>
        <only>FINDER</only>
        <autogen>--KeyToKey-- KeyCode::F, VK_CONTROL, KeyCode::CURSOR_RIGHT</autogen>
    </item>
    <item>
        <name>Ctrl+B to LEFT when Finder is active</name>
        <identifier>remap.ctrlb2left</identifier>
        <only>FINDER</only>
        <autogen>--KeyToKey-- KeyCode::B, VK_CONTROL, KeyCode::CURSOR_LEFT</autogen>
    </item>

</root>

No comments:

Post a Comment