pub fn is_alt_hotkey(ke: &KeyEvent, hot: char) -> boolExpand description
Test whether a key event is the Alt-accelerator for a given hotkey char.
Together with is_plain_hotkey (and optionally ctrl_to_arrow for
WordStar nav pre-processing), these predicates implement hotkey-accelerator
matching for buttons, clusters, and labels. Callers compose them with the
phase/focus gate.
Returns true iff:
ke.modifiers.altis set, andke.keyisKey::Char(c)wherecmatcheshotcase-insensitively.
Any Alt+Char is accepted case-insensitively; in practice hotkeys are always
letters or digits. Only alt is required; shift and ctrl are not checked.
§Turbo Vision heritage
Replaces the event.keyDown.keyCode == getAltCode(c) accelerator idiom
(tbutton.cpp, tcluster.cpp, tlabel.cpp). The original getAltCode was a
whitelist of A–Z, 0–9, -, =; this predicate is deliberately broader.
The Alt-Space special case is dropped.