Skip to content

Instantly share code, notes, and snippets.

@jrongbin
jrongbin / init.lua
Created June 18, 2017 12:09
中英文切换
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "Z", function()
if hs.keycodes.currentSourceID() == "com.apple.keylayout.US" then
hs.eventtap.keyStroke({}, "f19")
end
end)
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "E", function()
if hs.keycodes.currentSourceID() ~= "com.apple.keylayout.US" then
hs.eventtap.keyStroke({}, "f19")
end

Keybase proof

I hereby claim:

  • I am jrongbin on github.
  • I am jrongbin (https://keybase.io/jrongbin) on keybase.
  • I have a public key whose fingerprint is 8FB3 9E5F 032E E23A 71D8 8F09 7912 9506 EFBD EC20

To claim this, I am signing this object: