Skip to content

Instantly share code, notes, and snippets.

View ParatechX's full-sized avatar
🏠
Working from home

sven ParatechX

🏠
Working from home
  • Vancouver
View GitHub Profile
@ParatechX
ParatechX / gist:c03c1146f7cd719dbfd65a337c7228f3
Created November 2, 2018 21:30
Hammerspoon/Lua script to enable 2d scrolling on key(CTRL) press
-- SCROLL ON MOUSE MOVEMENT WHEN CTRL BUTTON DOWN
-- inspired by
-- https://superuser.com/questions/303424/can-i-enable-scrolling-with-middle-button-drag-in-os-x
--
-- add to hammerspoon config and hit hs.reload()
local scrollModifier = "ctrl"
local oldMousePosition = {}
local scrollIntensity = 4