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