Fix launcher search: key_name returned code-unit numbers instead of characters

String indexing yields a UTF-16 code unit, so 'a' became "97" and the launcher
rejected it. Convert to Char first; the input test now types into the search.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-24 20:21:46 -08:00
1 parent 9e7687bea8
commit 57d5376211
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -406,7 +406,7 @@ fn key_name(code : UInt, shift : Bool) -> String {
for r in rows {
let (first, chars) = r
if code >= first && code < first + chars.length().reinterpret_as_uint() {
let c = chars[(code - first).reinterpret_as_int()]
let c = Int::unsafe_to_char(chars[(code - first).reinterpret_as_int()].to_int())
return if shift && c >= 'a' && c <= 'z' {
Int::unsafe_to_char(c.to_int() - 32).to_string()
} else {