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_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.