Skip to content

Commit

Permalink
Fix Ctrl+C/Ctrl+V
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegratedQuantum committed May 26, 2024
1 parent 268b87f commit 3a5b5ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graphics/Window.zig
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ pub const GLFWCallbacks = struct {
std.log.err("GLFW Error({}): {s}", .{errorCode, description});
}
fn keyCallback(_: ?*c.GLFWwindow, glfw_key: c_int, scancode: c_int, action: c_int, _mods: c_int) callconv(.C) void {
if(main.gui.selectedTextInput != null and c.glfwGetKeyName(glfw_key, scancode) != null) return; // Don't send events for keys that are used in writing letters.
const mods: Key.Modifiers = @bitCast(@as(u6, @intCast(_mods)));
if(!mods.control and main.gui.selectedTextInput != null and c.glfwGetKeyName(glfw_key, scancode) != null) return; // Don't send events for keys that are used in writing letters.
if(action == c.GLFW_PRESS) {
for(&main.KeyBoard.keys) |*key| {
if(glfw_key == key.key) {
Expand Down

0 comments on commit 3a5b5ec

Please sign in to comment.