- Notifications
You must be signed in to change notification settings - Fork1k
Open
Description
Problem Statement
The Coder Terminal does not provide optimal Copy/Paste due to the overlap of Ctrl-C, Ctrl-Shift-C (and Paste), and requires use of context menus for Copy/Paste.
Current User Experience Issues
- Inconsistent Experience: Different behavior compared to native terminal applications
- Browser Conflicts: Ctrl+Shift+C opens browser developer tools instead of copying text (during testing GCP Shell, it would do both, fill the Copy Buffer AND open Devtools, a quirk that is not desired)
- OS Differences: Cmd-C on Mac works because it bypasses Ctrl
Reproduction Steps
- Windows environment (laptop or VDI)
- Using Chrome browser, open Terminal window
- Attempt to use standard copy/paste terminal key mappings
- Standard shortcuts (Ctrl+C, Ctrl+Shift+C, Ctrl+V, Ctrl+Shift+V) conflict with browser shortcuts or OS built int (Interrupt)
- Only workaround is right-click menu selection, which is unsuitable for frequent use
- Secondary workaround is remapping, i.e. using PowerToys on Windows to Ctrl-Insert
Proposed Solution
Implement copy/paste functionality similar to Google Cloud Platform's Cloud Console terminal, which provides:
- Copy-on-select: Automatically copy text when it's highlighted/selected in the terminal
- Browser shortcut override: Allow Ctrl+Shift+C and Ctrl+Shift+V to work specifically within the terminal context, overriding browser defaults
- Fallback support: Maintain compatibility with alternative shortcuts like Ctrl+Insert/Shift+Insert
- Middle-click paste: Support for middle mouse button paste functionality
Technical Implementation
- Leverage xterm.js capabilities for enhanced keyboard handling
- Implement browser-specific overrides for terminal-focused shortcuts
- Ensure compatibility across different browsers and operating systems
- Maintain existing terminal functionality (Ctrl+C for interrupt/break)
Business Impact
Developer Productivity
Customer Satisfaction
- Matches functionality available in other cloud terminal solutions
- Demonstrates commitment to developer experience
- Reduces barriers to adoption
Success Criteria
- Developers can use Ctrl+Shift+C/V for copy/paste in web terminal
- Copy-on-select functionality works reliably across browsers
- Middle-click paste support implemented
- No regression in existing terminal features
- Reduced support tickets related to copy/paste issues
- Positive feedback from beta testing with enterprise customers
Reference Implementation
Google Cloud Platform's Cloud Console terminal demonstrates this functionality is technically feasible and provides a good user experience benchmark. The GCP implementation shows that browser shortcut overrides can be successfully implemented for terminal-specific contexts.
xterm.js Integration
- Investigate keyboard event handling capabilities
- Ensure compatibility with current xterm.js version
- Plan for future xterm.js updates
Related Issues and Dependencies
- Current xterm.js implementation and limitations
- Browser security policies for keyboard event handling
- Cross-platform testing requirements
- Integration with existing Coder terminal infrastructure
Metadata
Metadata
Assignees
Labels
No labels