← All workSide project

CouchCode

Claude Code from the sofa, with a PS4 controller: buttons for keys, sticks for the pointer, my voice for the typing, and a rumble when Claude is done.

Year
2026
Stack
Python, SDL2, macOS Quartz events, Claude Code hooks

The idea occurred to me that vibe coding had become more and more like gaming, a collaborative creation and problem solving exercise. But sitting at your computer makes it feel like work. So, I had the irresistible idea of vibe coding a controller interface for vibe coding. That’s what this is. CouchCode lets me use Claude Code from the sofa with a PS4 controller. With Claude doing the typing, I just need to talk, read and choose: “yes”, “no”, “this one”, “try again”, and that just fits on a controller. How do you know what features to implement? Simple enough: Every time you have to reach for your keyboard to do anything you couldn’t do on the controller, that’s your next feature. It was pretty fun.

Cross

Press

Submit Enter

Send the prompt, or confirm the highlighted option.

With L2 held

Newline Shift+Enter

A new line in the prompt instead of sending it.

Generated from CouchCode's own config file. Hover or tap a button, hold L2 for the second layer, and pick the app in front to see its profile. Grey buttons really do nothing: a second-layer binding never falls back to the first. Got a PlayStation controller? Connect it and press a button.

So how does it work?

Do you really care? That’s the reality we’re living in now: it doesn’t actually matter.

Claude here, because Claude cares, because Claude has to maintain this spaghetti: Okay, CouchCode is under a thousand lines of Python for macOS. It reads the controller over Bluetooth through SDL2, looks each button up in a config file, and sends real keystrokes and mouse events through macOS’s Quartz event API, as if they came from a keyboard. The left stick scrolls, the right stick and the touchpad move the pointer, and R2 clicks.

A controller has far fewer buttons than a keyboard, but combinatorics are luckily on our side: holding L2 gives every other button a second job. ✕ sends the prompt and L2 + ✕ starts a new line. ○ is Escape and L2 + ○ is Escape twice, which clears the input. The bindings also follow the app in front. In Ghostty, my terminal, each tab is a Claude Code session, so L1 and R1 flip between them and L2 + Options opens a new tab already running Claude.

The config reloads itself whenever it is saved, so a button can be remapped and tried a second later. A broken config keeps the old mapping and gives one long, heavy rumble instead.

Typing by talking

From the sofa, the only real way to write a prompt is to say it. I tried two ways: Better Dictation, a dictation app with a global shortcut, and Claude Code’s built-in /voice, which listens while Space is held down. A terminal app can only tell that a key is being held from its repeats, so CouchCode sends those too.

Both worked. But /voice lives inside the terminal, and Better Dictation works in every app, so Better Dictation got △, held for as long as I talk, and /voice moved to L2 + △ in Ghostty. Cleaning up a bad dictation is what □ is for.

Knowing when it is my turn

Leaning back means not watching the screen. Claude Code can run a command when it finishes or needs an answer, so I pointed those hooks at a local port that CouchCode listens on, and it plays a rumble pattern for each. Two short buzzes: done. One long, heavy rumble: Claude has a question.

Claude is done

Stop hook, 330 ms

HeavyLight0100200300400 ms

Claude needs you

Notification hook, 350 ms

HeavyLight0100200300400 ms

The two patterns from CouchCode's config, as played on the DualShock's two motors: a heavy, low one and a light, buzzy one. With a controller connected, Feel it plays them on yours.

The pain-point log

Development ran on one rule from the README: add a line every time you reach for the keyboard or mouse, and that line is the next feature.

  1. Done:

    Talking: Better Dictation or Claude Code’s own /voice?

    Better Dictation on △, because it works in every app. /voice moved to L2 + △ in the terminal.

  2. Done:

    Switching between apps.

    L2 + L1 or R1 is the macOS app switcher. Keep L2 held to keep going, let go to pick.

  3. Done:

    Deleting text after a bad dictation.

    □ deletes a word at a time, L2 + □ the whole line.

  4. Done:

    The d-pad cursor was too slow.

    A shorter delay, a repeat that speeds up to about 80 characters a second, and L2 + ← → to jump by word.

  5. Done:

    Opening files and links from Claude’s output.

    L2 + R2 is a Cmd-click on whatever is under the pointer. Next idea: an on-screen link picker.

  6. Done:

    The pointer topped out too soon.

    Time-based speed, a tunable curve, and a boost when the stick is held all the way out.

  7. Open:

    Switching sessions in the Claude desktop app.

    Still looking for the shortcuts.

  8. Open:

    The next time I reach for the keyboard.

The pain-point log from the README, in its order. Each line was a moment I reached for the keyboard or mouse.

Where it got to

The first milestone was to finish a whole Claude Code task, from prompt to result, using only the controller. I got there. In practice it is mostly dictation and switching between windows, and it is not finished. Next on the list: controls that change when Claude asks for permission, an overlay with the state of every session, starting a new worktree and session from the controller, and a lightbar colour per session.

Next projectTwo-way neural flow bridges →