Documentation
¶
Overview ¶
Package keytest drives the shell's surfaces on a private headless sway from a virtual keyboard whose keymap, like wtype's or a remote-desktop peer's, carries its keys on codes of its own: each one on the code a physical keyboard gives a different key. A surface that reads its keys through the keymap acts on them; one that matches evdev codes acts on the wrong ones.
Index ¶
Constants ¶
const ( // Return is on evdev 1, a physical keyboard's Escape. Return = 1 // Escape is on evdev 28, a physical keyboard's Return. Escape = 28 // L is on evdev 35, a physical keyboard's H. L = 35 // H is on evdev 38, a physical keyboard's L. H = 38 // Tab is on evdev 30, a physical keyboard's A. Tab = 30 // Space is on evdev 31, a physical keyboard's S. Space = 31 // Left is on evdev 32, a physical keyboard's D. Left = 32 // Right is on evdev 33, a physical keyboard's F. Right = 33 // Up is on evdev 34, a physical keyboard's G. Up = 34 // Down is on evdev 36, a physical keyboard's J. Down = 36 // PageUp is on evdev 37, a physical keyboard's K. PageUp = 37 // PageDown is on evdev 44, a physical keyboard's Z. PageDown = 44 )
The evdev codes the keyboard types its keys on, each the code of another key on a physical keyboard.
Variables ¶
This section is empty.
Functions ¶
func AwaitFocus ¶
func AwaitFocus(t *testing.T, a *app.Application)
AwaitFocus waits until one of a's surfaces holds the keyboard, so the keys tapped next reach it.
Types ¶
type Keyboard ¶
Keyboard is the remapped virtual keyboard, with a pointer, typing to an application.
func Dial ¶
func Dial(t *testing.T, a *app.Application) *Keyboard
Dial connects the remapped keyboard to the sway apptest.Run started for a.