term.simple_get

term

simple_get() -> key, base_key

Read a keyboard event and return a simplified key description

Wraps get() to return either a single character for printable keys or a shortcut string like "CTRL+c" for modified keys. Ignores key release events.

The optional second return value base_key is the US QWERTY equivalent of the physical key, derived from the KKBP base field. It is non-nil only when it differs from the primary key (i.e. when a non-Latin keyboard layout is active). Callers that need layout-independent command dispatch (e.g. editor normal mode) can use base_key instead of key.