init.lua
function cycleInputMethod()
if hs.keycodes.currentSourceID() == "com.apple.keylayout.US" then
hs.keycodes.currentSourceID("com.apple.inputmethod.SCIM.ITABC" )
elseif hs.keycodes.currentSourceID() == "com.apple.inputmethod.SCIM.ITABC" then
hs.keycodes.currentSourceID("com.apple.inputmethod.Kotoeri.Japanese")
elseif hs.keycodes.currentSourceID() == "com.apple.inputmethod.Kotoeri.Japanese" then
hs.keycodes.currentSourceID("com.apple.keylayout.US")
end
end
mB[#mB+1] = hs.hotkey.bind({"shift", "ctrl", "cmd"}, "I", cycleInputMethod)
karabiner.xml
<item>
<name>Shift_R to Shift_R</name>
<appendix>(+ When you type Shift_R only, send s-S-C-i)</appendix>
<identifier>nichijou.remap.shiftR2shiftRRR</identifier>
<autogen>
__KeyOverlaidModifier__
KeyCode::SHIFT_R,
KeyCode::SHIFT_R,
KeyCode::I, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L
</autogen>
</item>