AI chat

Hold my side button and swipe to switch desktops

I have assumed your side button is Mouse4 (Back button) and configured it with a quick-tap fallback so normal clicks still register when you don't swipe.

Hardware note: Scripts that intercept or transform mouse movement using OnMove with mouse_block=true require a Rebind Link. They cannot run in software-only mode because suppressing physical cursor movement is hardware-gated.

How it works

  1. Suppresses cursor drift: mouse_block=true lets OnMove return false while the side button is held down, preventing your cursor from wandering across the screen during the gesture.
  2. Gesture detection: Horizontal delta (dx) accumulates while the button is down. Swiping left or right past the distance threshold fires the native desktop shortcut:
    • Windows: Ctrl + Win + Left / Ctrl + Win + Right
    • macOS: Ctrl + Left / Ctrl + Right
  3. Tap retention: If you release the side button quickly (< 200ms) without swiping, the script fires the original button click so regular actions (like browser Back) continue to work.

Learn more