diff --git a/src/main.zig b/src/main.zig
index 2755e97..2901f79 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -52,7 +52,6 @@ pub fn main() !void {
     while (true) {
         const events = try term.getEvents();
         _ = events;
-        // for (events) |ev| if (ev.system == .int) break;
         try term.draw();
         std.time.sleep(1000);
     }
@@ -82,10 +81,12 @@ pub const Terminal = struct {
         try term.uncook();
         try attachSignalHandlers();
         try term.updateWinSize();
+        try term.print("\x1b[>1u", .{});
         return term;
     }
 
     pub fn deinit(self: *Terminal) void {
+        self.print("\x1b[<u", .{}) catch @panic("failed to restore keyboard mode");
         self.events.deinit();
         self.box.deinit();
         self.cook() catch @panic("failed to restore termios");
@@ -128,7 +129,7 @@ pub const Terminal = struct {
             .mask = posix.empty_sigset,
             .flags = 0,
         };
-        try posix.sigaction(posix.SIG.INT, &act, null);
+        // try posix.sigaction(posix.SIG.INT, &act, null);
         try posix.sigaction(posix.SIG.USR1, &act, null);
         try posix.sigaction(posix.SIG.USR2, &act, null);
         try posix.sigaction(posix.SIG.WINCH, &act, null);
@@ -143,10 +144,16 @@ pub const Terminal = struct {
                         else => try self.events.append(ev),
                     }
                 },
-                // else => try self.events.append(ev);
+                else => try self.events.append(ev),
             }
             S.ev = null;
         }
+        var n: usize = 0;
+        if (os.linux.ioctl(self.tty.handle, os.linux.T.FIONREAD, @intFromPtr(&n)) == 0 and n > 0) {
+            var key: [1]u8 = undefined;
+            _ = try self.tty.reader().read(&key);
+            try self.events.append(Event{ .keyboard = .{ .char = key[0] } });
+        }
         return try self.events.toOwnedSlice();
     }
 
@@ -155,7 +162,7 @@ pub const Terminal = struct {
 
         fn handlerFn(sig: i32) callconv(.C) void {
             switch (sig) {
-                posix.SIG.INT => ev = Event{ .system = .int },
+                // posix.SIG.INT => ev = Event{ .system = .int },
                 posix.SIG.USR1 => ev = Event{ .system = .usr1 },
                 posix.SIG.USR2 => ev = Event{ .system = .usr2 },
                 posix.SIG.WINCH => ev = Event{ .system = .winch },
@@ -166,11 +173,14 @@ pub const Terminal = struct {
 
     pub const Event = union(enum) {
         system: enum {
-            int,
+            // int,
             usr1,
             usr2,
             winch,
         },
+        keyboard: struct {
+            char: u8,
+        },
     };
 
     fn updateWinSize(self: *Terminal) !void {