Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. init.lua
  2. #+BEGIN_SRC lua
  3. function cycleInputMethod()
  4. if hs.keycodes.currentSourceID() == "com.apple.keylayout.US" then
  5. hs.keycodes.currentSourceID("com.apple.inputmethod.SCIM.ITABC" )
  6. elseif hs.keycodes.currentSourceID() == "com.apple.inputmethod.SCIM.ITABC" then
  7. hs.keycodes.currentSourceID("com.apple.inputmethod.Kotoeri.Japanese")
  8. elseif hs.keycodes.currentSourceID() == "com.apple.inputmethod.Kotoeri.Japanese" then
  9. hs.keycodes.currentSourceID("com.apple.keylayout.US")
  10. end
  11. end
  12.  
  13. mB[#mB+1] = hs.hotkey.bind({"shift", "ctrl", "cmd"}, "I", cycleInputMethod)
  14. #+END_SRC
  15.  
  16. karabiner.xml
  17. #+BEGIN_SRC xml
  18. <item>
  19. <name>Shift_R to Shift_R</name>
  20. <appendix>(+ When you type Shift_R only, send s-S-C-i)</appendix>
  21. <identifier>nichijou.remap.shiftR2shiftRRR</identifier>
  22. <autogen>
  23. __KeyOverlaidModifier__
  24. KeyCode::SHIFT_R,
  25. KeyCode::SHIFT_R,
  26. KeyCode::I, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L
  27. </autogen>
  28. </item>
  29. #+END_SRC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement