mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
Merge pull request #751 from psnszsn/main
apprt/gtk: handle non-ascii keyvals
This commit is contained in:
@ -14,6 +14,7 @@ const CoreSurface = @import("../../Surface.zig");
|
|||||||
const App = @import("App.zig");
|
const App = @import("App.zig");
|
||||||
const Window = @import("Window.zig");
|
const Window = @import("Window.zig");
|
||||||
const inspector = @import("inspector.zig");
|
const inspector = @import("inspector.zig");
|
||||||
|
const gtk_key = @import("key.zig");
|
||||||
const c = @import("c.zig");
|
const c = @import("c.zig");
|
||||||
|
|
||||||
const log = std.log.scoped(.gtk);
|
const log = std.log.scoped(.gtk);
|
||||||
@ -905,6 +906,12 @@ fn keyEvent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Before using the physical key, try to convert the keyval
|
||||||
|
// directly to a key. This allows the use of key remapping.
|
||||||
|
if (gtk_key.keyFromKeyval(keyval)) |key| {
|
||||||
|
break :key key;
|
||||||
|
}
|
||||||
|
|
||||||
break :key physical_key;
|
break :key physical_key;
|
||||||
} else .invalid;
|
} else .invalid;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user