~/.hammerspoon/init.lua
-- after open outlook, switch the tab between mail and outlook calendar by (cmd+`)
hs.hotkey.bind({}, "f16", function()
hs.application.open('Outlook.app')
local outlook = hs.application.applicationsForBundleID('Outlook.app')
hs.eventtap.keyStroke({"cmd"}, '`', outlook)
end)hs.hotkey.bind({}, "f17", function()
hs.application.open('Google Chrome.app')
end)-- ctrl + f18
hs.hotkey.bind({"ctrl"}, "f18", function()
hs.application.open('Terminal.app')
end)-- ctrl + alt + f19
hs.hotkey.bind({"ctrl", "alt"}, "f19", function()
hs.application.open('Calendar.app')
end)
Ref: