mirror of
https://github.com/wez/wezterm.git
synced 2024-12-27 07:18:13 +03:00
e0ea0f46a8
refs: https://github.com/wez/wezterm/pull/2273 refs: https://github.com/wez/wezterm/issues/2253
32 lines
909 B
Markdown
32 lines
909 B
Markdown
# PasteFrom(source)
|
|
|
|
Paste the specified clipboard to the current pane.
|
|
|
|
This is only really meaningful on X11 and some Wayland systems that have multiple clipboards.
|
|
|
|
Possible values for source are:
|
|
|
|
* `Clipboard` - paste from the system clipboard
|
|
* `PrimarySelection` - paste from the primary selection buffer
|
|
|
|
See also [Paste](Paste.md).
|
|
|
|
```lua
|
|
local wezterm = require 'wezterm'
|
|
local act = wezterm.action
|
|
|
|
return {
|
|
keys = {
|
|
-- paste from the clipboard
|
|
{ key = 'V', mods = 'CTRL', action = act.PasteFrom 'Clipboard' },
|
|
|
|
-- paste from the primary selection
|
|
{ key = 'V', mods = 'CTRL', action = act.PasteFrom 'PrimarySelection' },
|
|
},
|
|
}
|
|
```
|
|
|
|
*Since: 20220319-142410-0fcdea07*
|
|
|
|
`PrimarySelection` is now also supported on Wayland systems that support [primary-selection-unstable-v1](https://wayland.app/protocols/primary-selection-unstable-v1) or the older Gtk primary selection protocol.
|