Key events return boolean if handled

This commit is contained in:
Mitchell Hashimoto
2025-01-04 12:45:03 -08:00
parent 4031815a8d
commit 3e89c4c2f4
5 changed files with 69 additions and 32 deletions

View File

@@ -1606,13 +1606,13 @@ pub const CAPI = struct {
export fn ghostty_surface_key(
surface: *Surface,
event: KeyEvent,
) void {
_ = surface.app.keyEvent(
) bool {
return surface.app.keyEvent(
.{ .surface = surface },
event.keyEvent(),
) catch |err| {
log.warn("error processing key event err={}", .{err});
return;
return false;
};
}