controller

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 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

Overview

Package controller can simulate user interaction

User interaction is primarily keyboard and mouse input. Mouse input is primarily clicking elements. Keyboard input should also handle:

- Move focus when pressing `tab` - Submit a form when pressing `enter` in a form field

Assuming that the events are not cancelled, and forms pass validation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyboardController

type KeyboardController struct {
	Window html.Window
}

KeyboardController simulates the user typing a sequence of keys.

func (KeyboardController) SendKey

func (c KeyboardController) SendKey(k key.Key)

SendKey simulates the input of a single key.

If c has no Window, this function will produce no effects.

func (KeyboardController) SendKeys

func (c KeyboardController) SendKeys(keys iter.Seq[key.Key])

SendKeys simulates the user typing a sequence of keys. The key package contains functionality to generate sequences of keys from an input string.

Ignored if no Window is assigned.

func (KeyboardController) SendText added in v0.11.3

func (c KeyboardController) SendText(text string)

Jump to

Keyboard shortcuts

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