VibeTunnel home page
Search VibeTunnel docs...
⌘K
Getting Started
Introduction
INDEX
Project overview
Keyboard shortcuts
CONTRIBUTING
CHANGELOG
Installation
README
README
VT INSTALLATION
Custom node
Architecture
ARCHITECTURE
Architecture mario
Spec
Ios spec
Spec
BuildArchitectures
Socket protocol
Authentication
Security
Advanced Features
Hq
Push notification
Terminal titles
TESTING EXTERNAL DEVICES
Development
Development
Build system
Testing
Logging style guide
Files
macOS Development
BuildRequirements
Code signing
RELEASE GUIDE
Sparkle keys
Sparkle stats store
iOS Development
Conversion
Modern swift
Swift concurrency
Swiftui
Swift testing playbook
Logging private fix
iOS Testing
README
TestCoverage
TestingApproach
Web Development
README
Performance
Playwright testing
SEQUENTIAL OPTIMIZATIONS
Npm
Systemd
Release & Deployment
Deployment
RELEASE
Tools & Integration
Claude
CLAUDE
Gemini
GEMINI
README.md
Maintenance
Org migrate
VibeTunnel home page
Search VibeTunnel docs...
⌘K
Search...
Navigation
Documentation
Documentation
Terminal quick keys chord implementation
Mobile Chord System Implementation
Overview
Implemented a chord system that allows mobile users to use Option+Arrow key combinations for word navigation:
Option key acts as a toggle/modifier
When Option is pressed, it activates and waits for an arrow key
When an arrow key is pressed while Option is active, it sends the combination
Visual feedback shows when Option modifier is active
Implementation Details
1. State Management
Added
activeModifiers
Set to track which modifiers are currently active
Option key toggles its state in the Set rather than sending immediately
2. Chord Detection
When Option is pressed, it’s added to activeModifiers
When an arrow key is pressed with Option active:
Clears the Option modifier
Sends Option (ESC) first
Then sends the arrow key
This creates the Option+Arrow combination
3. Visual Feedback
Added CSS class
.modifier-key.active
with blue background
Option button shows active state when pressed
State clears after arrow key press or when pressing non-arrow keys
4. Key Mappings
Option sends ESC (
\x1b
) - already implemented in direct-keyboard-manager.ts
Arrow keys send their normal codes
The combination results in ESC+arrow sequences for word navigation:
Option+Left = ESC+b (word backward)
Option+Right = ESC+f (word forward)
Testing
Added comprehensive tests in
terminal-quick-keys.test.ts
covering:
Toggle behavior of Option key
Chord detection for all arrow keys
Clearing of modifier state
Visual update requests
Multiple chord sequences
Usage
Tap Option key (⌥) - it highlights in blue
Tap any arrow key - sends Option+Arrow combination
Option automatically deactivates after use
Can tap Option again to cancel without sending
This provides an intuitive way for mobile users to access word navigation without requiring a physical keyboard.
On this page
Mobile Chord System Implementation
Overview
Implementation Details
1. State Management
2. Chord Detection
3. Visual Feedback
4. Key Mappings
Testing
Usage
Assistant
Responses are generated using AI and may contain mistakes.