edit.js: can read existing files; change on tty key read that arrow keys are now distinguished from ctrl-S or something

This commit is contained in:
minjaesong
2021-04-14 11:35:39 +09:00
parent 390176591d
commit adaeadd6ca
8 changed files with 97 additions and 32 deletions

View File

@@ -0,0 +1,6 @@
println("Hit Ctrl-C or Ctrl-D to exit");
while (true) {
let keys = con.poll_keys()
println(keys);
if (keys[1] == 129 && (keys[0] == 31 || keys[0] == 32)) break;
}