keys

package
v0.3.20 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 3 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 keys reads a surface's key presses by the symbol the seat's keymap gives them, never by evdev code: a client that sends its own keymap (wtype, a remote-desktop peer) puts its keys on codes of its own, and a keyboard layout moves letters, so a code names no key.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnEscape

func OnEscape(read Translator, fn func()) func(r *widget.Router, code uint32, mods app.Mods)

OnEscape is an OnKey hook that runs fn on Escape, whatever modifiers are held, and ignores every other key.

func OnKey

func OnKey(read Translator, h Handler) func(r *widget.Router, code uint32, mods app.Mods)

OnKey is an OnKey hook for a window or layer that hands each press to h by symbol.

Types

type Handler

type Handler func(r *widget.Router, sym xkb.Keysym, mods app.Mods)

Handler receives one key press by symbol. Latin letters, whose keysyms are their code points, arrive lower case whatever Shift or Caps Lock did to them, so Ctrl+L is 'l' on any layout and lock state.

type Translator

type Translator func(code uint32) xkb.Keysym

Translator reads an evdev code through the seat's keymap and current modifier state (app.Application.KeySym).

Jump to

Keyboard shortcuts

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