Remove keyboard test code

This commit is contained in:
Sam Tebbs 2021-01-23 12:25:16 +00:00
parent c414e9c170
commit e48c1a2e3c

View file

@ -192,31 +192,6 @@ fn initStage2() noreturn {
else => {}, else => {},
} }
const kb = keyboard.getKeyboard(0) orelse unreachable;
var shift = false;
while (true) {
if (kb.readKey()) |key| {
if (key.released) {
if (key.position == keyboard.KeyPosition.LEFT_SHIFT) {
shift = false;
}
continue;
}
var char: ?u8 = switch (key.position) {
keyboard.KeyPosition.LEFT_SHIFT, keyboard.KeyPosition.RIGHT_SHIFT => blk: {
shift = true;
break :blk null;
},
keyboard.KeyPosition.Q => if (shift) @as(u8, 'Q') else @as(u8, 'q'),
keyboard.KeyPosition.W => if (shift) @as(u8, 'W') else @as(u8, 'w'),
else => null,
};
if (char) |ch| {
tty.print("{c}", .{ch});
}
}
}
// Can't return for now, later this can return maybe // Can't return for now, later this can return maybe
arch.spinWait(); arch.spinWait();
} }