My MacBook trackpad has four edges I never touch. Meanwhile I kept reaching for the menu bar to change the volume or the brightness. So I built Brink, a free menu bar app that turns those edges into controls:

  • Right edge: slide for volume
  • Left edge: slide for brightness
  • Top edge: slide for keyboard light
  • Bottom edge: swipe to skip a track
  • Top-right corner: double-tap to mute

It shows the same HUD as the keyboard keys, ticks under your finger as you slide, and keeps the pointer still while you do it. Here's how it works.

Reading raw touches

NSEvent gestures can't tell you that a finger is resting 3 mm from the right edge. You only get scrolls and swipes once macOS has already decided what the gesture is. Brink reads raw contact frames from the private MultitouchSupport framework instead: MTDeviceCreateList, MTRegisterContactFrameCallback, MTDeviceStart. Each frame lists every finger's normalized position, so the app can tell when a touch starts in an edge zone.

Every symbol is resolved with dlopen/dlsym. A private API can change, so a missing symbol turns the feature off instead of crashing the app.

Telling a slide from a scroll

This is the hard part. A finger near the edge might be the start of a slide, an ordinary two-finger scroll, a palm, or a tap. The engine is a small state machine:

enum State { Idle, Candidate { zone: Zone, id: i32, x0: f32, y0: f32, t0: f64, frozen: bool, corner: bool }, Sliding(Slide), Lost { slide: Slide, since: f64 }, Spent { frozen: bool }, } 
  • Candidate: one finger landed in a zone. It becomes a slide once it moves along the edge by more than SLIDE_START, a swipe after SWIPE_DISTANCE, or a tap if it lifts quickly without moving.
  • Lost: trackpads drop a finger for a frame or two mid-slide, so the slide waits 180 ms for the finger to come back before ending.
  • Spent: a second finger arrived, or the gesture belongs to someone else. Brink ignores everything until all fingers lift.

A watchdog tick ends any slide that stops receiving frames. It's pure logic with no system calls, so the tests feed it synthetic frames.

Making it feel native

  • HUD: volume and brightness changes are posted as system-defined NSEvents carrying the media-key codes (NX_KEYTYPE_SOUND_UP and friends) through CGEventPost. macOS draws its own HUD, exactly as if you'd pressed the key. With Shift and Option held you get quarter steps, just like the keyboard.
  • Haptics: MTActuatorCreateFromDeviceID and MTActuatorActuate fire a light tick on every step, so you can feel the slider.
  • Holding the pointer still: while a slide is live, an event tap (CGEventTapCreate) swallows mouse-moved and drag events, so the cursor doesn't drift across the screen as your finger travels.

The panel

Brink itself is Tauri 2 with a Rust core. The menu bar panel is a WebView styled as liquid glass, and on macOS 26 it sits on a real NSGlassEffectView. To keep the text readable on any wallpaper, the backdrop is toned per pixel and a feathered mask darkens just the area behind the labels.

Shipping

  • Universal binary (Apple silicon and Intel), signed and notarized
  • Auto-updates with Tauri's updater and minisign-signed releases
  • Homebrew: brew trust muhammadalims/tap && brew install --cask muhammadalims/tap/brink

It's free, and it runs on macOS 13 or later: zerowing.in/brink

If you try it, I'd love to hear where the gesture detection gets it wrong for you, especially palm rejection on the bigger trackpads.