문서 보기역링크PDF로 내보내기맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. # Hammerspoon 한영변환 ``` local inputSource = { english = "com.apple.keylayout.ABC", korean = "com.apple.inputmethod.Korean.2SetKorean", } -- 한영변환 local changeInput = function() local current = hs.keycodes.currentSourceID() local nextInput = nil if current == inputSource.english then nextInput = inputSource.korean else nextInput = inputSource.english end local result = hs.keycodes.currentSourceID(nextInput) if result == true then hs.alert.show(nextInput) end end -- hs.hotkey.bind(nil, 'f13', changeInput) -- change layout hs.hotkey.bind({}, "f13", function() -- hs.eventtap.keyStroke({"ctrl", "option"}, "space") local lay = hs.keycodes.currentLayout() print(lay) if lay == "ABC" then -- hs.keycodes.setLayout("2-Set Korean") -- hs.keycodes.currentSourceID(inputSource.korean) hs.keycodes.setMethod("2-Set Korean") else -- hs.keycodes.currentSourceID(inputSource.english) hs.keycodes.setLayout("ABC") end end) ``` open/hammerspoon-한영변환.txt 마지막으로 수정됨: 2020/06/02 09:25저자 127.0.0.1