I usually have a (non-apple) mouse and a magic trackpad on my machines. While using the mouse, muscle memory dictates that the scroll wheel zooms, while clicking and dragging the middle mouse button pans, like in many other CAD packages. However, zooming on the trackpad is neither very useful nor smooth enough for me. I like the panning behaviour, though, and muscle memory agrees with panning on the trackpad, like in any other program.
Is there a way to make the trackpad behave like the “Use trackpad for panning” pref is enabled, but make the scroll wheel zoom, like that pref is disabled?
Edit:
I can no longer reply because the topic has been closed. I recently managed to get the behaviour I wanted with Hammerspoon using the following config:
kicadScrolling = hs.eventtap.new({hs.eventtap.event.types.scrollWheel}, function(e)
-- Trackpad scroll events are continuous, mouse scroll events are not.
if 0 == e:getProperty(hs.eventtap.event.properties.scrollWheelEventIsContinuous) then
local front = hs.application.frontmostApplication()
if "KiCad" == front:name() then
local title = front:focusedWindow():title()
if "Eeschema" == title:sub(0, 8) or "Pcbnew" == title:sub(0, 6) then
local flags = e:getFlags()
flags['cmd'] = true
e:setFlags(flags)
--else
--print(title)
end
end
end
end):start()
This needs “Use trackpad for panning” enabled and automatically adds the Cmd modifier to scroll events from the mouse wheel, so you can pan with the trackpad and zoom with the mouse!