From 6fb9a113c121ec7f5623b67e6fa14fc1e67ea853 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 13 Aug 2023 15:12:25 -0700 Subject: [PATCH] apprt/glfw: send mods to charcallback --- src/apprt/glfw.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index 195f67646..90d08dfba 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -285,6 +285,7 @@ pub const Surface = struct { /// This is set to true when keyCallback consumes the input, suppressing /// the charCallback from being fired. key_consumed: bool = false, + key_mods: input.Mods = .{}, pub const Options = struct {}; @@ -597,8 +598,7 @@ pub const Surface = struct { return; } - // TODO: mods - core_win.charCallback(codepoint, .{}) catch |err| { + core_win.charCallback(codepoint, core_win.rt_surface.key_mods) catch |err| { log.err("error in char callback err={}", .{err}); return; };