output

package
v0.38.7 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package output is the Windows text-output adapter. Transcribed text + assist results are paste-injected via clipboard + SendInput; the package also exposes a fallback keystroke-typing path for targets that refuse paste. Pure Win32 / winapi consumer.

Audit 2026-05-24 maintainability sweep.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureSelectedText

func CaptureSelectedText(ctx context.Context) (string, error)

CaptureSelectedText copies the current selection, reads clipboard text, and restores the backup.

func SetClipboardText

func SetClipboardText(text string) error

SetClipboardText replaces the current clipboard content with the provided text.

Types

type ClipboardHandler

type ClipboardHandler struct{}

ClipboardHandler injects text via clipboard + Ctrl+V simulation.

func NewClipboardHandler

func NewClipboardHandler() *ClipboardHandler

func (*ClipboardHandler) Handle

func (h *ClipboardHandler) Handle(ctx context.Context, result *stt.Result, target Target) error

type OutputHandler

type OutputHandler interface {
	Handle(ctx context.Context, result *stt.Result, target Target) error
}

OutputHandler defines how transcribed text is delivered to the user.

type Target

type Target struct {
	HWND windows.Handle
}

Target stores the intended destination window for paste output.

func CaptureTarget

func CaptureTarget() Target

Jump to

Keyboard shortcuts

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