Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- init.lua
- #+BEGIN_SRC 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)
- #+END_SRC
- karabiner.xml
- #+BEGIN_SRC 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>
- #+END_SRC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement