This commit is contained in:
Philipp Hochkamp 2023-01-15 21:58:06 +01:00
parent c2a8bd6db1
commit 0eddaa2893

View file

@ -295,20 +295,20 @@ end)
-- Mouse Shortcuts -- Mouse Shortcuts
---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
local function handleMouse5() local function handleMouse4()
hs.eventtap.keyStroke({ modifier.cmd }, "left") hs.eventtap.keyStroke({ modifier.cmd }, "left")
end end
local function handleMouse4() local function handleMouse5()
hs.eventtap.keyStroke({ modifier.cmd }, "right") hs.eventtap.keyStroke({ modifier.cmd }, "right")
end end
-- bind mouse3/4 to back and forward -- bind mouse3/4 to back and forward
mouseTap = hs.eventtap.new({ hs.eventtap.event.types.otherMouseDown }, function(event) mouseTap = hs.eventtap.new({ hs.eventtap.event.types.otherMouseDown }, function(event)
if event:getButtonState(5) then if event:getButtonState(3) then
handleMouse5()
elseif event:getButtonState(4) then
handleMouse4() handleMouse4()
elseif event:getButtonState(4) then
handleMouse5()
end end
return true return true
end) end)