Enum Keysym
An xkb keysym, the symbol a key produces. Get one from the Key table or a KeyEvent.
lua
local quit_key = Key.Escape
local name = tostring(quit_key)
local same = Key.escape == quit_keyValues
Key.<name> -> KeysymKey.<name>
The keysym with this xkb name, such as Key.Return, Key.a, Key.F1, Key.KP_Add or Key.XF86AudioRaiseVolume.
- Names ignore case. When that matches two keysyms the lowercase one wins:
Key.Aisa, andKey.f1isF1. - To match a shifted letter, compare
event.raw_keywith the lowercase key and checkevent.modifiers.shift.
Errors for an unknown name.
Operators
keysym == other -> booleankeysym == other
True when both are the same keysym.
- Lua only calls this when both sides are userdata, so
keysym == "a"andkeysym == 97are always false. Compare names withtostring(keysym) == "a".
tostring(keysym) -> stringtostring
The xkb name, such as "Return" or "A".
keysym .. value -> stringkeysym .. value
The name joined with value turned into text, on either side: "key " .. Key.Return is "key Return".