open:hammerspoon-hotkey-bind

hammerspoon hotkey bind

function keyScript(mod, key, script)  
  hs.hotkey.bind(mod, key, function()    
    hs.osascript.applescript(script)   
    -- hs.osascript.applescript("tell application \"System Events\" to key code 123 using control down")        
    -- hs.osascript.applescript("tell application \"Mission Control\" to launch")    
  end)
end

function keybindUp(mod, key, strokeMod, strokeKey)
  hs.hotkey.bind(mod, key, nil, function()
    hs.eventtap.keyStroke(strokeMod, strokeKey)
  end)
end

  • open/hammerspoon-hotkey-bind.txt
  • 마지막으로 수정됨: 2020/06/02 09:25
  • 저자 127.0.0.1