まく使いの憂鬱(Karabiner)の設定ファイル

Karabiner の設定ファイル。
もうこれがないと職場で仕事できないレベルになってきたのでバックアップ代わりに晒しておく。

VirtualBox 内と VNC 経由で Windows で nfer/xfer で IME 制御したい Mac 利用者っていう変態的なケースなので需要は少ないかもしれん。
Karabiner がなかったら OS-X は個人的にはもう諦めてたと思う(OS 8 くらいの時期から Mac に触ってるはずだが今でも Finder の挙動に耐えられん)

<?xml version="1.0"?>
<!-- Karabiner/private.xml -->
<root>
	<appdef>
		<appname>VirtualBox</appname>
		<equal>org.virtualbox.app.VirtualBoxVM</equal>
	</appdef>
	<appdef>
		<appname>VNC</appname>
		<equal>com.geekspiff.chickenofthevnc</equal>
		<equal>net.sourceforge.chicken</equal>
		<prefix>de.jinx.JollysFastVNC</prefix>
		<prefix>com.realvnc.vncviewer</prefix>
	</appdef>
	<appdef>
		<appname>iTerm</appname>
		<equal>com.googlecode.iterm2</equal>
	</appdef>
	<item>
		<name>Use Eisuu as Shift + F12 in VirtualBox</name>
		<identifier>private.virtualbox_eisuu</identifier>
		<only>VirtualBox</only>
		<autogen>__KeyToKey__ KeyCode::JIS_EISUU, KeyCode::F12, ModifierFlag::SHIFT_L</autogen>
	</item>
	<item>
		<name>Use Kana as Han/Zen in VirtualBox</name>
		<identifier>private.virtualbox_kana</identifier>
		<only>VirtualBox</only>
		<autogen>__KeyToKey__ KeyCode::JIS_KANA, KeyCode::JIS_PC_HAN_ZEN</autogen>
	</item>
	<item>
		<name>Use CapsLock as Ctrl in VNC Viewer</name>
		<identifier>private.vnc_ctrl</identifier>
		<only>VNC</only>
		<autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::CONTROL_L</autogen>
	</item>
	<item>
		<name>Use Yen mark as Backslash in VNC Viewer</name>
		<identifier>private.vnc_yen</identifier>
		<only>VNC</only>
		<autogen>__KeyToKey__ KeyCode::JIS_YEN, ModifierFlag::NONE, KeyCode::VK_JIS_BACKSLASH</autogen>
	</item>
	<item>
		<name>Use Eisuu as Ctrl + F13 in VNC Viewer</name>
		<identifier>private.vnc_eisuu</identifier>
		<only>VNC</only>
		<autogen>__KeyToKey__ KeyCode::JIS_EISUU, KeyCode::F13, ModifierFlag::CONTROL_L</autogen>
	</item>
	<item>
		<name>Use Kana as Ctrl + F14 in VNC Viewer</name>
		<identifier>private.vnc_kana</identifier>
		<only>VNC</only>
		<autogen>__KeyToKey__ KeyCode::JIS_KANA, KeyCode::F14, ModifierFlag::CONTROL_L</autogen>
	</item>
	<item>
		<name>Use Underscore as Backslash globally</name>
		<identifier>private.global_yen</identifier>
		<autogen>__KeyToKey__ KeyCode::JIS_UNDERSCORE, ModifierFlag::NONE, KeyCode::VK_JIS_BACKSLASH</autogen>
	</item>
	<item>
		<name>Use Home as Command + Left globally except VirtualBox, VNC and iTerm</name>
		<identifier>private.global_home</identifier>
		<not>VirtualBox, VNC, iTerm</not>
		<autogen>__KeyToKey__ KeyCode::HOME, KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L</autogen>
	</item>
	<item>
		<name>Use End as Command + Right globally except VirtualBox, VNC and iTerm</name>
		<identifier>private.global_end</identifier>
		<not>VirtualBox, VNC, iTerm</not>
		<autogen>__KeyToKey__ KeyCode::END, KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L</autogen>
	</item>
</root>

尚、Windows 側の IME の設定は手動でやってる。
こいつもレジストリエディタとかでなんとかならんのかなと思い続けて気がつけば十年くらい経ってる気がする。

7/25 追記 iTerm で Home/End を除外した。ちょっと弄ると他で影響が出てくるのがつらい。
後年追記 Karabiner-Elements の設定 まく使いの憂鬱(Karabiner-Elements)の設定ファイル - public: typedef Takel::Diary Observable;