Debian Codegraph @

input/clipboard.go

raw
1 package input
2
3 import "github.com/charmbracelet/x/ansi"
4
5 // ClipboardSelection represents a clipboard selection. The most common
6 // clipboard selections are "system" and "primary" and selections.
7 type ClipboardSelection = byte
8
9 // Clipboard selections.
10 const (
11 SystemClipboard ClipboardSelection = ansi.SystemClipboard
12 PrimaryClipboard ClipboardSelection = ansi.PrimaryClipboard
13 )
14
15 // ClipboardEvent is a clipboard read message event. This message is emitted when
16 // a terminal receives an OSC52 clipboard read message event.
17 type ClipboardEvent struct {
18 Content string
19 Selection ClipboardSelection
20 }
21
22 // String returns the string representation of the clipboard message.
23 func (e ClipboardEvent) String() string {
24 return e.Content
25 }