Teek API Documentation

Translates the DSL’s Tk-free key vocabulary (friendly symbols, “Ctrl-x” style modifier strings) into real Tk bind event patterns. Its own small lookup, kept separate from Handle so it’s easy to extend.

Class Methods

patterns_for(modifiers, keysym)

Tk event patterns to bind for a resolved [modifiers, keysym] pair - usually just one, but Shift+Tab is a known cross-platform gotcha: X11 delivers it as the distinct keysym ISO_Left_Tab, not Tab with a Shift modifier, so binding only silently never fires there. Bind every spelling so the handler fires regardless of platform; on platforms where a given spelling never occurs, that binding is simply inert.

Parameters
  • modifiers Array<String>
  • keysym String

Returns Array<String> — Tk bind event patterns, e.g. ["<Control-s>"]

resolve(spec)

Parameters
  • spec Symbol, String — a friendly key (:enter) or a "Modifier-Modifier-Key" string ("Ctrl-Shift-s")

Returns Array(Array<String>, String) — [tk_modifiers, tk_keysym]