From 4a55205202174c512f09cf8e553d810f52ca0183 Mon Sep 17 00:00:00 2001 From: Richard Acayan Date: Thu, 31 Oct 2024 18:27:07 -0400 Subject: [PATCH] core: layout: correctly convert character to keysym Some characters, such as U+03A3 (GREEK CAPITAL LETTER SIGMA) don't convert directly to the proper key symbol. Use a xkeysym library function to do correct conversions. --- src/core/layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/layout.rs b/src/core/layout.rs index 9e0cf1b..2a5dd60 100644 --- a/src/core/layout.rs +++ b/src/core/layout.rs @@ -491,7 +491,7 @@ impl LayoutFile { let c1 = chars.next(); let c2 = chars.next(); match (c1, c2) { - (Some(c), None) => KeyValue::from(Keysym::new(c as u32), name), + (Some(c), None) => KeyValue::from(Keysym::from_char(c), name), _ => KeyValue::from(Keysym::NoSymbol, ""), } }