key

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT, Unlicense Imports: 5 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ModShortcut = ModCtrl
View Source
const ModShortcutAlt = ModCtrl

Variables

This section is empty.

Functions

This section is empty.

Types

type Caret

type Caret struct {
	Pos f32.Point

	Ascent float32

	Descent float32
}

type EditEvent

type EditEvent struct {
	Range Range
	Text  string
}

func (EditEvent) ImplementsEvent

func (EditEvent) ImplementsEvent()

type Event

type Event struct {
	Name Name

	Modifiers Modifiers

	State State
}

func (Event) ImplementsEvent

func (Event) ImplementsEvent()

type Filter

type Filter struct {
	Focus event.Tag

	Required Modifiers

	Optional Modifiers

	Name Name
}

func (Filter) ImplementsFilter

func (Filter) ImplementsFilter()

type FocusCmd

type FocusCmd struct {
	Tag event.Tag
}

func (FocusCmd) ImplementsCommand

func (FocusCmd) ImplementsCommand()

type FocusDirection

type FocusDirection int
const (
	FocusRight FocusDirection = iota
	FocusLeft
	FocusUp
	FocusDown
	FocusForward
	FocusBackward
)

type FocusEvent

type FocusEvent struct {
	Focus bool
}

func (FocusEvent) ImplementsEvent

func (FocusEvent) ImplementsEvent()

type FocusFilter

type FocusFilter struct {
	Target event.Tag
}

func (FocusFilter) ImplementsFilter

func (FocusFilter) ImplementsFilter()

type InputHint

type InputHint uint8
const (
	HintAny InputHint = iota

	HintText

	HintNumeric

	HintEmail

	HintURL

	HintTelephone

	HintPassword
)

type InputHintOp

type InputHintOp struct {
	Tag  event.Tag
	Hint InputHint
}

func (InputHintOp) Add

func (h InputHintOp) Add(o *op.Ops)

type Modifiers

type Modifiers uint32
const (
	ModCtrl Modifiers = 1 << iota

	ModCommand

	ModShift

	ModAlt

	ModSuper
)

func (Modifiers) Contain

func (m Modifiers) Contain(m2 Modifiers) bool

func (Modifiers) String

func (m Modifiers) String() string

type Name

type Name string
const (
	NameLeftArrow      Name = "←"
	NameRightArrow     Name = "→"
	NameUpArrow        Name = "↑"
	NameDownArrow      Name = "↓"
	NameReturn         Name = "⏎"
	NameEnter          Name = "⌤"
	NameEscape         Name = "⎋"
	NameHome           Name = "⇱"
	NameEnd            Name = "⇲"
	NameDeleteBackward Name = "⌫"
	NameDeleteForward  Name = "⌦"
	NamePageUp         Name = "⇞"
	NamePageDown       Name = "⇟"
	NameTab            Name = "Tab"
	NameSpace          Name = "Space"
	NameCtrl           Name = "Ctrl"
	NameShift          Name = "Shift"
	NameAlt            Name = "Alt"
	NameSuper          Name = "Super"
	NameCommand        Name = "⌘"
	NameF1             Name = "F1"
	NameF2             Name = "F2"
	NameF3             Name = "F3"
	NameF4             Name = "F4"
	NameF5             Name = "F5"
	NameF6             Name = "F6"
	NameF7             Name = "F7"
	NameF8             Name = "F8"
	NameF9             Name = "F9"
	NameF10            Name = "F10"
	NameF11            Name = "F11"
	NameF12            Name = "F12"
	NameBack           Name = "Back"
)

type Range

type Range struct {
	Start int
	End   int
}

type SelectionCmd

type SelectionCmd struct {
	Tag event.Tag
	Range
	Caret
}

func (SelectionCmd) ImplementsCommand

func (SelectionCmd) ImplementsCommand()

type SelectionEvent

type SelectionEvent Range

func (SelectionEvent) ImplementsEvent

func (SelectionEvent) ImplementsEvent()

type Snippet

type Snippet struct {
	Range
	Text string
}

type SnippetCmd

type SnippetCmd struct {
	Tag event.Tag
	Snippet
}

func (SnippetCmd) ImplementsCommand

func (SnippetCmd) ImplementsCommand()

type SnippetEvent

type SnippetEvent Range

func (SnippetEvent) ImplementsEvent

func (SnippetEvent) ImplementsEvent()

type SoftKeyboardCmd

type SoftKeyboardCmd struct {
	Show bool
}

func (SoftKeyboardCmd) ImplementsCommand

func (SoftKeyboardCmd) ImplementsCommand()

type State

type State uint8
const (
	Press State = iota

	Release
)

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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