mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
gtk(input): fix value used for lowercase lower_unicode
When converting keyval to the unshifted version, gdk_keyval_to_lower returns a keyval type, not a unicode value. Convert this to unicode before assigning to keyval_unicode_unshifted. This fixes a bug where the incorrect keycode is sent in alternate layouts with kitty keyboard on linux.
This commit is contained in:
@ -757,8 +757,8 @@ fn keyEvent(
|
|||||||
// Norwegian, and French layouts and thats what we have real users for
|
// Norwegian, and French layouts and thats what we have real users for
|
||||||
// right now.
|
// right now.
|
||||||
const lower = c.gdk_keyval_to_lower(keyval);
|
const lower = c.gdk_keyval_to_lower(keyval);
|
||||||
if (std.math.cast(u21, lower)) |val| break :unshifted val;
|
const lower_unicode = c.gdk_keyval_to_unicode(lower);
|
||||||
break :unshifted 0;
|
break :unshifted std.math.cast(u21, lower_unicode) orelse 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// We always reset our committed text when ending a keypress so that
|
// We always reset our committed text when ending a keypress so that
|
||||||
|
Reference in New Issue
Block a user