mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge branch 'select_mode'
This commit is contained in:
@@ -21,7 +21,8 @@ window.addEventListener('load', function() {
|
||||
socket.on('connect', function() {
|
||||
var term = new Terminal({
|
||||
cols: 80,
|
||||
rows: 24
|
||||
rows: 24,
|
||||
screenKeys: true
|
||||
});
|
||||
|
||||
term.on('data', function(data) {
|
||||
@@ -47,6 +48,28 @@ window.addEventListener('load', function() {
|
||||
}, false);
|
||||
```
|
||||
|
||||
## Tmux-like
|
||||
|
||||
While term.js has always supported copy/paste using the mouse, it now also
|
||||
supports several keyboard based solutions for copy/paste.
|
||||
|
||||
term.js includes a tmux-like selection mode (enabled with the `screenKeys`
|
||||
option) which makes copy and paste very simple. `Ctrl-A` enters `prefix` mode,
|
||||
from here you can type `Ctrl-V` to paste. Press `[` in prefix mode to enter
|
||||
selection mode. To select text press `v` (or `space`) to enter visual mode, use
|
||||
`hjkl` to navigate and create a selection, and press `Ctrl-C` to copy.
|
||||
|
||||
`Ctrl-C` (in visual mode) and `Ctrl-V` (in prefix mode) should work in any OS
|
||||
for copy and paste. `y` (in visual mode) will work for copying only on X11
|
||||
systems. It will copy to the primary selection.
|
||||
|
||||
Note: `Ctrl-C` will also work in prefix mode for the regular OS/browser
|
||||
selection. If you want to select text with your mouse and copy it to the
|
||||
clipboard, simply select the text and type `Ctrl-A + Ctrl-C`, and
|
||||
`Ctrl-A + Ctrl-V` to paste it.
|
||||
|
||||
For mac users: consider `Ctrl` to be `Command/Apple` above.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
|
||||
+2
-1
@@ -37,7 +37,8 @@
|
||||
var term = new Terminal({
|
||||
cols: 80,
|
||||
rows: 24,
|
||||
useStyle: true
|
||||
useStyle: true,
|
||||
screenKeys: true
|
||||
});
|
||||
|
||||
term.on('data', function(data) {
|
||||
|
||||
+1060
-16
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user