Commit 7bfb8d4
committed
vt, input: translate \0 as Ctrl+Space
There exists an ambiguous control character in standard 7-bit ASCII
terminals, `\0`, which is the traditional encoding for Ctrl+Space and
Ctrl+Shift+2 (or Ctrl+@ on US-104 keyboards).
```
Space 0x20 0b00100000
@ 0x40 0b01000000
^^^^^
control character bits 0b00000
```
Anyway, edit didn't support it. We also had a bug in the Windows
KEY_EVENT parser where we would disregard otherwise acceptable inputs
such as `\0` with a scancode indicating that it came from a keypress
(such as, well, Ctrl+Space).1 parent 885ef2e commit 7bfb8d4
3 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
| |||
0 commit comments