我需要切换三个输入法
https://i.loli.net/2019/06/05/5cf79a690d23162842.png
然而 command-SPC 切换的方式太慢了
目前我是用 karabiner 设置 option-1/2/3 分别对应三种输入法,但使用过程依然觉得不流畅(需要去思考按什么),而且在 EL Capitan 下有“切换后图标改变但输入仍是英文”的 bug。
见到过最优的切换方式应该是 Gboard: 她会在你最近使用的两个输入法间切换,如果切换后你未使用当前输入法进行任何输入,则判定你需要第三种输入法,再按小地球就会切换第三种输入法。
但该方法似乎只能在输入法内部实现。
现在我能想到最好的就是通过 hammerspoon 按顺序切换三种输入法,然后在通过 karabiner 把它赋予右 shift。
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
你有什么好的设计思路吗?
或者最新版本的 MacOS 有什么变化么?
