From 53702343c2a32a9529926d8f575a7708c74a2955 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 27 Apr 2022 20:57:43 -0700 Subject: [PATCH] ctrl-l is form feed --- src/Window.zig | 2 ++ src/terminal/Terminal.zig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Window.zig b/src/Window.zig index 32ad18587..2620fdf53 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -305,6 +305,8 @@ fn keyCallback( //log.info("KEY {} {} {} {}", .{ key, scancode, mods, action }); if (action == .press or action == .repeat) { const c: u8 = switch (key) { + // Ctrl-L form-feed + .l => if (mods.control) 0x0C else return, .backspace => 0x08, .enter => '\n', else => return, diff --git a/src/terminal/Terminal.zig b/src/terminal/Terminal.zig index 35fd7f0af..dfb78adac 100644 --- a/src/terminal/Terminal.zig +++ b/src/terminal/Terminal.zig @@ -114,7 +114,7 @@ pub fn append(self: *Terminal, alloc: Allocator, str: []const u8) !void { /// /// This may allocate if necessary to store the character in the grid. pub fn appendChar(self: *Terminal, alloc: Allocator, c: u8) !void { - log.debug("char: {}", .{c}); + //log.debug("char: {}", .{c}); const actions = self.parser.next(c); for (actions) |action_opt| { switch (action_opt orelse continue) {