2021-01-19 09:20:52 +00:00
|
|
|
---
|
|
|
|
module: [kind=event] paste
|
|
|
|
---
|
|
|
|
|
2023-03-15 21:52:13 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
|
|
|
|
2023-03-28 09:23:28 +00:00
|
|
|
SPDX-License-Identifier: MPL-2.0
|
2023-03-15 21:52:13 +00:00
|
|
|
-->
|
|
|
|
|
2023-08-24 09:48:30 +00:00
|
|
|
The [`paste`] event is fired when text is pasted into the computer through Ctrl-V (or ⌘V on Mac).
|
2021-01-19 09:20:52 +00:00
|
|
|
|
|
|
|
## Return values
|
2023-08-24 09:48:30 +00:00
|
|
|
1. [`string`]: The event name.
|
|
|
|
2. [`string`] The text that was pasted.
|
2021-01-19 09:20:52 +00:00
|
|
|
|
|
|
|
## Example
|
|
|
|
Prints pasted text:
|
|
|
|
```lua
|
|
|
|
while true do
|
|
|
|
local event, text = os.pullEvent("paste")
|
|
|
|
print('"' .. text .. '" was pasted')
|
|
|
|
end
|
|
|
|
```
|