shell now accepts envvar KEYBOARD and changes key layout on the fly

This commit is contained in:
minjaesong
2021-09-24 15:02:41 +09:00
parent 012bc44845
commit f7631619d3
2 changed files with 5 additions and 1 deletions

View File

@@ -426,7 +426,7 @@ con.KEY_INSERT = 210;
con.KEY_DELETE = 211;
con.KEY_BACKSPACE = 8;
con.KEY_TAB = 9;
con.KEY_RETURN = 13;
con.KEY_RETURN = 10;
con.getch = function() {
return sys.readKey();
};

View File

@@ -319,6 +319,10 @@ shell.coreutils = {
}
else {
_TVDOS.variables[key] = shell.replaceVarCall(value);
// if key is KEYBOARD, reload the keyboard layout
if ("KEYBOARD" == key)
input.changeKeyLayout(_TVDOS.variables.KEYBOARD || "us_qwerty");
}
}
},