mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-12-28 17:14:39 +00:00
gtk: fix xkb mapping not working on linux
Signed-off-by: Cedric BULTEEL <cedric@oceanspy.com>
This commit is contained in:
committed by
Cedric BULTEEL
parent
765ee68429
commit
0a03434656
@@ -1137,13 +1137,14 @@ pub const Surface = extern struct {
|
||||
if (entry.native == keycode) break :w3c entry.key;
|
||||
} else .unidentified;
|
||||
|
||||
// If the key should be remappable, then consult the pre-remapped
|
||||
// XKB keyval/keysym to get the (possibly) remapped key.
|
||||
// Consult the pre-remapped XKB keyval/keysym to get the (possibly)
|
||||
// remapped key. If the W3C key or the remapped key
|
||||
// is eligible for remapping, we use it.
|
||||
//
|
||||
// See the docs for `shouldBeRemappable` for why we even have to
|
||||
// do this in the first place.
|
||||
if (w3c_key.shouldBeRemappable()) {
|
||||
if (gtk_key.keyFromKeyval(keyval)) |remapped|
|
||||
if (gtk_key.keyFromKeyval(keyval)) |remapped| {
|
||||
if (w3c_key.shouldBeRemappable() or remapped.shouldBeRemappable())
|
||||
break :keycode remapped;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user