input

command
v1.17.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0 modules, 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

Command input opens a 640x400 window that logs every key and pointer event (with slog) and changes the mouse cursor: a text cursor over the left half of the window, a pointing hand over the right half. It is a development example (milestone 1): it uses the internal packages directly, before the public API exists.

Run it with: go run ./examples/dev/input

Things to try: type (with Shift, AltGr, and a dead key if your layout has one), hold a key to see the repeats, move the mouse across the middle of the window, press buttons, use the wheel, scroll or pinch on a touchpad, touch the screen. Press Escape or close the window to quit.

Environment: GLUTTER_DEV_LOCK=1 locks the pointer (SPEC §27.6) at the first event of the mouse, to try the lock of a platform without the framework: the pointer events then stay where they were, with the motion in dx and dy; GLUTTER_BACKEND=x11 or wayland picks the windowing system (else the session's), GLUTTER_DEV_SHM=1 draws through a wl_shm buffer instead of EGL (Wayland only), and XCURSOR_THEME and XCURSOR_SIZE choose the cursor theme when the compositor does not draw the cursors itself.

Jump to

Keyboard shortcuts

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