webssh2_client 2.0.0-alpha.6 → 2.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -68,11 +68,19 @@ For server setup instructions, refer to the [WebSSH2 server documentation](https
|
|
|
68
68
|
- OS-aware keyboard shortcuts (Ctrl+F on Windows/Linux, ⌘F on macOS)
|
|
69
69
|
- Navigation with Enter/Shift+Enter or arrow buttons
|
|
70
70
|
- F3/Shift+F3 for quick match navigation
|
|
71
|
+
- **Advanced Clipboard Integration:**
|
|
72
|
+
- Auto-copy on selection (similar to terminals like tmux or PuTTY, configurable)
|
|
73
|
+
- Middle-click paste support (configurable)
|
|
74
|
+
- Keyboard shortcuts: Ctrl+Shift+C/V (Windows/Linux) or Cmd+Shift+C/V (macOS)
|
|
75
|
+
- Browser compatibility detection with fallback mechanisms
|
|
76
|
+
- Visual feedback with toast notifications
|
|
77
|
+
- All features can be toggled in Terminal Settings
|
|
71
78
|
- Customizable terminal settings:
|
|
72
79
|
- Font size and family
|
|
73
80
|
- Color schemes
|
|
74
81
|
- Cursor behavior
|
|
75
82
|
- Scrollback buffer size
|
|
83
|
+
- Clipboard behavior controls
|
|
76
84
|
- Session logging with download capability
|
|
77
85
|
- Copy and paste functionality
|
|
78
86
|
- Terminal mouse support
|
|
@@ -367,6 +375,53 @@ The system automatically detects whether you're using:
|
|
|
367
375
|
- Mixed usage supported (header + headerBackground or headerStyle)
|
|
368
376
|
- Graceful fallback to CSS for non-Tailwind values
|
|
369
377
|
|
|
378
|
+
### Clipboard Settings
|
|
379
|
+
|
|
380
|
+
The WebSSH2 client includes comprehensive clipboard integration. All clipboard features can be configured through the Terminal Settings modal (accessible from the menu) or via localStorage:
|
|
381
|
+
|
|
382
|
+
#### Features
|
|
383
|
+
|
|
384
|
+
1. **Auto-copy on Selection**: Automatically copies selected text to the system clipboard when you select text with your mouse (similar to tmux or PuTTY)
|
|
385
|
+
2. **Middle-click Paste**: Paste clipboard contents by middle-clicking in the terminal
|
|
386
|
+
3. **Keyboard Shortcuts**: Use Ctrl+Shift+C to copy and Ctrl+Shift+V to paste (Cmd+Shift+C/V on macOS)
|
|
387
|
+
|
|
388
|
+
#### Configuration
|
|
389
|
+
|
|
390
|
+
Clipboard settings are stored in localStorage under `webssh2.settings.global` and can be toggled via the Terminal Settings modal:
|
|
391
|
+
|
|
392
|
+
- `clipboardAutoSelectToCopy` (default: `true`) - Enable/disable auto-copy on selection
|
|
393
|
+
- `clipboardEnableMiddleClickPaste` (default: `true`) - Enable/disable middle-click paste
|
|
394
|
+
- `clipboardEnableKeyboardShortcuts` (default: `true`) - Enable/disable keyboard shortcuts
|
|
395
|
+
|
|
396
|
+
#### Browser Compatibility
|
|
397
|
+
|
|
398
|
+
The clipboard integration includes:
|
|
399
|
+
|
|
400
|
+
- Automatic detection of browser clipboard API support
|
|
401
|
+
- Fallback mechanisms for older browsers
|
|
402
|
+
- Security context validation (HTTPS/localhost required)
|
|
403
|
+
- Browser-specific warnings and guidance
|
|
404
|
+
- Visual feedback via toast notifications for clipboard operations
|
|
405
|
+
|
|
406
|
+
#### Programmatic Configuration
|
|
407
|
+
|
|
408
|
+
You can also configure clipboard settings programmatically:
|
|
409
|
+
|
|
410
|
+
```javascript
|
|
411
|
+
// Read current settings
|
|
412
|
+
const settings = JSON.parse(
|
|
413
|
+
localStorage.getItem('webssh2.settings.global') || '{}'
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
// Update clipboard settings
|
|
417
|
+
settings.clipboardAutoSelectToCopy = false // Disable auto-copy
|
|
418
|
+
settings.clipboardEnableMiddleClickPaste = true // Enable middle-click
|
|
419
|
+
settings.clipboardEnableKeyboardShortcuts = true // Enable shortcuts
|
|
420
|
+
|
|
421
|
+
// Save settings
|
|
422
|
+
localStorage.setItem('webssh2.settings.global', JSON.stringify(settings))
|
|
423
|
+
```
|
|
424
|
+
|
|
370
425
|
### Configuration Object
|
|
371
426
|
|
|
372
427
|
You can configure the client by setting `window.webssh2Config`:
|
package/client/public/client.htm
CHANGED