mod(read_input): read user input from tty
This commit is contained in:
@@ -50,6 +50,12 @@ pub fn main() !void {
|
||||
try terminal.setCursorPositionHome();
|
||||
log.debug("Size := [x: {d}, y: {d}]", .{ size.cols, size.rows });
|
||||
},
|
||||
.key => |key| {
|
||||
log.debug("received key: {any}", .{key});
|
||||
if (terminal.Key.matches(key, .{ .cp = 'q' })) {
|
||||
app.quit = true; // TODO: who should emit the .quit event?
|
||||
}
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
const events = try layout.handle(event);
|
||||
|
||||
Reference in New Issue
Block a user