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.
This commit is contained in:
Richard Acayan 2024-10-31 18:27:07 -04:00
parent 1323cada17
commit 4a55205202
No known key found for this signature in database
GPG key ID: 0346F4894879DB73

View file

@ -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, ""),
}
}