clipboard

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Push

func Push(ctx context.Context, dev device.Sender, p *ClipboardPlugin) error

Push copies the local clipboard to the remote device using wl-paste or xclip -o.

Types

type ClipboardBody

type ClipboardBody struct {
	Content   string `json:"content"`
	Timestamp int64  `json:"timestamp,omitempty"`
}

ClipboardBody represents the content of a clipboard packet.

type ClipboardFileBody

type ClipboardFileBody struct {
	Filename string `json:"filename"`
}

ClipboardFileBody is the body of kdeconnect.clipboard.file.

type ClipboardPlugin

type ClipboardPlugin struct {
	// contains filtered or unexported fields
}

ClipboardPlugin handles clipboard sync both directions.

func NewClipboardPlugin

func NewClipboardPlugin(tlsConfig *tls.Config, logger *zap.Logger) *ClipboardPlugin

NewClipboardPlugin creates a clipboard plugin.

func (*ClipboardPlugin) Handle

func (p *ClipboardPlugin) Handle(ctx context.Context, dev device.Sender, pkt *protocol.Packet) error

Handle processes incoming clipboard packets.

func (*ClipboardPlugin) IncomingTypes

func (p *ClipboardPlugin) IncomingTypes() []string

IncomingTypes returns the packet types this plugin handles.

func (*ClipboardPlugin) Name

func (p *ClipboardPlugin) Name() string

Name returns the plugin name.

func (*ClipboardPlugin) OnConnect

func (p *ClipboardPlugin) OnConnect(dev device.Sender)

func (*ClipboardPlugin) OnDisconnect

func (p *ClipboardPlugin) OnDisconnect(dev device.Sender)

func (*ClipboardPlugin) OutgoingTypes

func (p *ClipboardPlugin) OutgoingTypes() []string

OutgoingTypes returns the packet types this plugin may send.

func (*ClipboardPlugin) Timeout

func (p *ClipboardPlugin) Timeout() time.Duration

Timeout returns the timeout.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL