mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-24 10:16:59 -06:00
In the browser, pressing AltGr while editing text on the canvas inserted the word "AltGraph" into the story. eframe's web backend (0.36.2, web/input.rs text_from_keyboard_event) turns a keydown into a text event unless the key is on a fixed list of names. Browsers report many more named keys than that list holds: AltGraph, Dead, Unidentified, the media keys. Each one arrived as text. Panel text fields are not affected, because a focused egui text field takes its text from the browser's input events instead of keydown. The web shell now drops a text event that is a key name (ASCII letters and digits, starting with a capital, longer than one character) unless an egui text field has the keyboard. One key press never types such a word; a text field's input events can, so they are left alone. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>