[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2050":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},2050,"hypervibe","machinarii\u002Fhypervibe","machinarii","One-handed vibe coding using Apple TV Remote, customizable buttons and gestures.","",null,"Swift",167,6,133,1,0,9,10,31,27,68.64,"MIT License",false,"main",[26,27,28,29],"hardware","inputdevice","vibe-coding","voice-ai","2026-06-12 04:00:13","\u003Cimg src=\"banner.png\" alt=\"HyperVibe — a walkie-talkie for Claude Code\">\n\n# HyperVibe V0.1\n\nOne-handed vibe coding using Apple TV remote, customizable buttons and gestures.\n\nGrab a remote, push to talk, and vibe-code with Claude Code without breaking flow.\n\n\u003Cimg src=\"demo.gif\" alt=\"HyperVibe demo\" width=\"70%\">\n\nTested with the 1st-gen Siri Remote (Model A1513). Support for Xbox Adaptive Joystick coming soon.\n\n> **Experimental release.** For now, HyperVibe ships as an experiment — there is no pre-built binary. You'll have to build the app bundle yourself (see [Building](#building)). Your mileage may vary.\n\n---\n\n## Features\n\n### Buttons\n\nEach physical Siri Remote button is independently assignable via the menu bar.\n\n\u003Cimg src=\"siri-remote-button-mapping-default.png\" alt=\"Default Siri Remote button mapping\" width=\"50%\">\n\n\u003Cimg src=\"screenshot-button-mapping.png\" alt=\"Button Mappings menu screenshot\" width=\"70%\">\n\n**Default Button Mapping (Customizable):**\n- Menu → Esc\n- TV → Ctrl + C\n- Siri → Space (Claude voice dictation)\n- Play\u002FPause → Enter\n- Volume Up → Up arrow\n- Volume Down → Down arrow\n\n| Action | Behavior |\n|---|---|\n| Play\u002Fpause button | Enter (submit prompt) |\n| Volume up button | Up arrow |\n| Volume down button | Down arrow |\n| Menu button | Esc (Navigate back) |\n| TV button | Control + C (cancel prompt) |\n| Trackpad click | Left mouse click |\n| Siri\u002Fmic button | Space on hold (Claude voice dictation must be enabled) |\n\n**Hold-Capable Buttons:** Push-to-talk actions require buttons that emit both press and release HID events. Only Play\u002FPause, Volume Up, Volume Down, and Siri buttons allow for both events. Also this button can trigger right command or option key for other dictation apps like [VoiceInk](https:\u002F\u002Fgithub.com\u002FBeingpax\u002FVoiceInk).\n\n\n### Swipe Gestures\n\nFour independently configurable single-finger swipe directions on the trackpad surface. Detection is velocity-gated: **distance ≥ 35%** of trackpad, **duration \u003C 350 ms**, **dominant axis ≥ 2×** the other. Slow drags continue to move the cursor; only deliberate flicks trigger actions.\n\n\u003Cimg src=\"siri-remote-gesture-mapping.png\" alt=\"Siri Remote swipe gesture mapping\" width=\"50%\">\n\n\u003Cimg src=\"screenshot-swipe-mapping.png\" alt=\"Swipe Gestures menu screenshot\" width=\"70%\">\n\n**Default Gesture Mapping (Customizable):**\n- Swipe Up → `\u002Fusage`\n- Swipe Down → `\u002Fcompact`\n- Swipe Left → `\u002Fmodel`\n- Swipe Right → Mode Switching (Shift + Tab)\n\nAssignable actions:\n\n- **Arrow keys (direction-matched)**: \"Left: Navigate Left\" offered only on Swipe Left; \"Right: Navigate Right\" offered only on Swipe Right.\n- **Mode Switching (Shift + Tab)** — toggle between normal \u002F plan \u002F auto-accept modes in Claude Code.\n- **`ultrathink`** — inserts the keyword (with trailing space) into the prompt.\n- **Slash commands**: `\u002Fbtw`, `\u002Fcompact`, `\u002Fconfig`, `\u002Fcontext`, `\u002Feffort`, `\u002Finit`, `\u002Fmodel`, `\u002Fremote-control`, `\u002Fschedule`, `\u002Ftasks`, `\u002Fusage`.\n- **None**.\n\n**Trailing-space policy.** Commands that typically take an argument (`\u002Fbtw`, `\u002Fschedule`, `ultrathink`) are typed with a trailing space so you can keep typing. Commands that stand alone or open an interactive picker (`\u002Fcompact`, `\u002Fconfig`, `\u002Fcontext`, `\u002Feffort`, `\u002Finit`, `\u002Fmodel`, `\u002Fremote-control`, `\u002Ftasks`, `\u002Fusage`) are typed without a trailing space.\n\n**Enter is never sent** — gestures type the command but leave Enter for the user, so the command can be reviewed, edited, or augmented with arguments.\n\n### Other Trackpad Inputs\n\n- **Cursor movement** via single-finger drag\n- **Two-finger scroll** (natural-scroll direction, configurable scale)\n- **Tap-to-click** on the trackpad surface\n- **Drag** by holding the trackpad click and moving\n\n### Persistence\n\nButton mappings and swipe mappings are saved to UserDefaults (`buttonMappings`, `swipeMappings`) and survive restarts. Schema versioning handles future upgrades (`buttonMappingsSchema`).\n\n### Safety\n\n- **Stuck-key prevention.** If the remote disconnects while a push-to-talk key is held, HyperVibe releases the virtual key automatically.\n- **Stale-hold self-heal.** If a release HID event is ever missed, the next press closes the stale hold before opening a new one.\n- **HID seize.** On connect, HyperVibe seizes the remote at the HID level so macOS no longer also sees media key events from it — no double-dispatch (e.g., to iTunes\u002FMusic), no system funk sound on unhandled keys.\n\n---\n\n## Building\n\n### Prerequisites\n\n- macOS 11 (Big Sur) or later\n- Xcode Command Line Tools: `xcode-select --install`\n\n### Build\n\n```bash\n.\u002Fbuild.sh\n```\n\nThis runs a single `swiftc` invocation over all the project's Swift files, linking IOKit, CoreGraphics, AudioToolbox, Carbon, AppKit, and the private MultitouchSupport framework via a bridging header. No Xcode project is required.\n\n---\n\n## Installing and Running\n\n1. Build and bundle: `.\u002Fbuild.sh && .\u002Fcreate_app_bundle.sh`\n2. Move `HyperVibe.app` to `\u002FApplications` (optional but helps icon caching)\n3. Launch it (`open HyperVibe.app`)\n4. Grant permissions in **System Settings → Privacy & Security**:\n   - **Accessibility** (for posting keyboard\u002Fmouse events)\n   - **Input Monitoring** (for reading HID events)\n   - **Bluetooth** (to communicate with the remote)\n5. Pair the Siri Remote via **System Settings → Bluetooth** if it isn't already paired\n6. Use the menu-bar walkie-talkie glyph to access Button Mappings and Swipe Gestures\n\n> ⚠️ **Important:** You must explicitly add **HyperVibe.app** to **System Settings → Privacy & Security → Input Monitoring** (click the **+** button and select the app). Without this, HyperVibe may not properly intercept HID events\u002Fmedia keys, which means vol up and down buttons and play\u002Fpause buttons will trigger volume change and triggering of Apple Music.\n\nA diagnostic log is written to `\u002Ftmp\u002Fhypervibe.log` (NSLog is redacted under hardened runtime, so HyperVibe uses file-based logging).\n\n---\n\n### Why two paths for the same button?\n\nA physical Siri Remote press can arrive two ways:\n\n1. **HID (seized)** — `RemoteInputHandler` reads raw HID input.\n2. **AVRCP → NX_SYSDEFINED** — Bluetooth media-key events `MediaKeyInterceptor` catches via an event tap.\n\nBoth paths converge on the same button mapping through a 200 ms debounce (static `lastProcessedButton`\u002F`lastProcessedTime` on `RemoteInputHandler`), so a press fires the mapped action exactly once regardless of which path delivers it first.\n\n### The NX_SYSDEFINED hack (media keys)\n\nmacOS has no public API for synthesizing or intercepting media keys (Play\u002FPause, Next, Previous, Volume, Mute). Both `MediaKeyInterceptor` and `MediaController` rely on the same undocumented `NSSystemDefined` event format used internally by the Human Interface Device stack:\n\n- **Event type** `NX_SYSDEFINED` (raw value `14`) with **subtype `8`**.\n- **Key code and state packed into `data1`** as a bitfield: `(nxKeyCode \u003C\u003C 16) | (keyState \u003C\u003C 8)`, where `0xA` = key down and `0xB` = key up.\n- **Magic `modifierFlags`** (`0xa00` for down, `0xb00` for up) mirror the state nibble — real media key events arrive with these flags, and some consumers (e.g. Music.app) won't accept posted events without them.\n\n`MediaKeyInterceptor` installs a **`.cghidEventTap`** at `.headInsertEventTap` so it sees `NX_SYSDEFINED` events *before* the system dispatcher routes them to Music\u002FiTunes\u002Fetc. — a session-level tap would arrive too late. It then manually unpacks `data1` to recover the key code and down\u002Fup state. The tap is automatically re-enabled on `tapDisabledByTimeout`, `tapDisabledByUserInput`, and `NSWorkspace.didWakeNotification`, because macOS silently disables event taps across sleep\u002Fwake and input stalls.\n\n`MediaController` goes the other way: it **fabricates** matching `NSSystemDefined` events via `NSEvent.otherEvent(...)` with the same magic flags, subtype, and `data1` packing, then posts the underlying `CGEvent` to the session tap. A **`usleep(50_000)`** gap between the down and up events is required — without the 50 ms pause, macOS coalesces or drops the pair and the media key is ignored.\n\nThis is the standard reverse-engineered technique (originally surfaced in projects like SPMediaKeyTap and Noteify), but it is entirely undocumented and can change without notice in any macOS release.\n\n---\n\n## Caveats\n\n- Uses Apple's **private `MultitouchSupport` framework** — not App Store compatible; Apple may change or remove this API in future macOS releases.\n- **NX_SYSDEFINED media-key synthesis and interception is undocumented** — relies on magic modifier-flag values (`0xa00`\u002F`0xb00`), subtype `8`, and a manual `data1` bitfield layout. Apple could break this in any release.\n\n### Long-term direction: Xbox Adaptive Joystick\n\nBetween the private `MultitouchSupport` framework and the undocumented `NX_SYSDEFINED` plumbing, the Siri Remote path is built on two proprietary, reverse-engineered interfaces that Apple can break at any time. HyperVibe may migrate its primary input to the **Xbox Adaptive Joystick**, which speaks standard USB HID \u002F GameController.framework and avoids every proprietary hazard above. That gives a more permanent, App Store–viable foundation — and, as a bonus, a genuinely accessible input device — while the Siri Remote support remains as a best-effort path for users who already own one.\n- Tested on **Siri Remote 1st-gen (A1513, product ID `0x266`)**. Button HID codes are a superset likely to cover the 2nd-gen Siri Remote (A2540) as well, but its click-ring directional presses and dedicated Mute button are not yet mapped in `identifyButton`.\n- Ad-hoc signing ties TCC permission grants to the exact binary hash — rebuilds may require re-approval in System Settings.\n\n---\n\n## Credits\n\n **Fork & improvements.** HyperVibe is built on top of [Remotastic](https:\u002F\u002Fgithub.com\u002Flauschue\u002FRemotastic) by [@lauschue](https:\u002F\u002Fgithub.com\u002Flauschue), which provided the foundational Siri-Remote HID handling, MultitouchSupport integration, and menu-bar scaffolding. HyperVibe extends it with configurable Claude Code workflows, keyboard shortcuts, push-to-talk and swipe gesture.\n- Icons from [The Noun Project](https:\u002F\u002Fthenounproject.com\u002F):\n  - [Arrow Up by Dayeong Kim](https:\u002F\u002Fthenounproject.com\u002Ficon\u002Farrow-up-6066125\u002F)\n  - [Microphone by Alvida](https:\u002F\u002Fthenounproject.com\u002Ficon\u002Fmicrophone-8162320\u002F)\n  - [Radio by Kiran Shastry](https:\u002F\u002Fthenounproject.com\u002Ficon\u002Fradio-2338991\u002F)","HyperVibe 是一个使用 Apple TV 遥控器进行单手编程的工具，支持自定义按钮和手势。其核心功能包括通过 Siri Remote 的物理按键映射来执行常见的编程操作，如 Esc、Ctrl+C 以及语音输入等，并且支持在触控板上配置四种独立的滑动手势以触发特定命令或模式切换。该项目采用 Swift 语言开发，目前处于实验阶段，用户需自行构建应用包。适用于需要提高编码效率且偏好非传统输入方式的开发者，特别是那些希望在不中断工作流的情况下与 Claude Code 进行交互的场景。",2,"2026-06-11 02:47:47","CREATED_QUERY"]