Skip to content

Modern Tui TuiKeyName

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Events › TuiKeyName

TuiKeyName

Returns a readable name for a key, such as "Ctrl+Shift+F5".

Syntax

TuiKeyName( byval k as TuiKey ) as ustring

Description

A printable name, modifiers included -- for a status line, a keybinding list, or a log.

Example

#import "std/tui"
using tui

dim as TuiKey k
k.code = TUIKEY_F5
print TuiKeyName( k )             '' F5

k.mods = TUIMOD_CTRL or TUIMOD_SHIFT
print TuiKeyName( k )             '' Ctrl+Shift+F5

k.code = TUIKEY_CHAR : k.ch = asc( "a" ) : k.mods = TUIMOD_ALT
print TuiKeyName( k )             '' Alt+a

See also

TuiEvent TuiKey.IsChar TuiMouse TuiInput.Feed TuiInput.PushEvent TuiInput.Buffered
TuiKey TuiKey.HasMod TuiInput TuiInput.NextEvent TuiInput.Reset TuiInput.Queued

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Events
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally