parser: don't encode tab and enter as ctrl+I and ctrl+m
This commit is contained in:
parent
9968735795
commit
d51530cb73
1 changed files with 4 additions and 1 deletions
|
@ -81,8 +81,11 @@ pub fn parse(self: *Parser, input: []const u8) !Result {
|
||||||
const key: Key = switch (b) {
|
const key: Key = switch (b) {
|
||||||
0x00 => .{ .codepoint = '@', .mods = .{ .ctrl = true } },
|
0x00 => .{ .codepoint = '@', .mods = .{ .ctrl = true } },
|
||||||
0x08 => .{ .codepoint = Key.backspace },
|
0x08 => .{ .codepoint = Key.backspace },
|
||||||
|
0x09 => .{ .codepoint = Key.tab },
|
||||||
|
0x0D => .{ .codepoint = Key.enter },
|
||||||
0x01...0x07,
|
0x01...0x07,
|
||||||
0x09...0x1A,
|
0x0A...0x0C,
|
||||||
|
0x0E...0x1A,
|
||||||
=> .{ .codepoint = b + 0x60, .mods = .{ .ctrl = true } },
|
=> .{ .codepoint = b + 0x60, .mods = .{ .ctrl = true } },
|
||||||
0x1B => escape: {
|
0x1B => escape: {
|
||||||
// NOTE: This could be an errant escape at the end
|
// NOTE: This could be an errant escape at the end
|
||||||
|
|
Loading…
Reference in a new issue