Emacsユーザ向けKeyRemap4MacBoook用追加設定
KeyRemap4MacBookにEmacsぽい操作をいくつか追加。
Terminal.appがC-/とC-'に対応してくれないので、Emacs側で適当に設定してそのキーを送るようにした。
<item>
<name>Option+W to Command+C</name>
<sysctl>option.emacsmode_OptionWCopy</sysctl>
<not>EMACS, TERMINAL, VIRTUALMACHINE, REMOTEDESKTOPCONNECTION, X11, ECLIPSE</not>
<autogen>--KeyToKey-- KeyCode::W, VK_OPTION, KeyCode::C, ModifierFlag::COMMAND_L</autogen>
</item>
<item>
<name>Control+/ to Command_Z</name>
<sysctl>option.emacsmode_controlSlash</sysctl>
<not>EMACS, TERMINAL, VIRTUALMACHINE, REMOTEDESKTOPCONNECTION, X11, ECLIPSE</not>
<autogen>--KeyToKey-- KeyCode::SLASH, VK_CONTROL, KeyCode::Z, ModifierFlag::COMMAND_L</autogen>
</item>
<item>
<name>Control+S to Command+F</name>
<sysctl>option.emacsmode_controlS</sysctl>
<not>EMACS, TERMINAL, VIRTUALMACHINE, REMOTEDESKTOPCONNECTION, X11, ECLIPSE</not>
<autogen>--KeyToKey-- KeyCode::S, VK_CONTROL, KeyCode::F, ModifierFlag::COMMAND_L</autogen>
</item>
<item>
<name>[Terminal] Control+/ to C-_ and Control+' to C-M-_</name>
<sysctl>option.emacsmode_controlSlashTerminal</sysctl>
<only>TERMINAL</only>
<autogen>--KeyToKey-- KeyCode::SLASH, VK_CONTROL, KeyCode::MINUS, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L</autogen>
<autogen>--KeyToKey-- KeyCode::QUOTE, VK_CONTROL, KeyCode::MINUS, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L | ModifierFlag::OPTION_L</autogen>
</item>