So I'm working on a project about terminal based "progression", and I wanted to make the effect that terminals present in Linux/MacOS, etc. Right now, the text sticks at the top and gets replaced when the Enter key is pressed. Is there a way to create a new line at the bottom and move the older lines upward? Thanks!
Here is a link to the CodePen Project I am using currently. https://codepen.io/ZacV/pen/abEYpLz '''
function onKeyPressed(e) {
var keyCode = e.keyCode;
var key = e.key;
var currentText;
if (keyCode == 13){
currentText = document.getElementById("Input").value;
textfield.push(currentText);
$("#Input").val("");
// document.getElementById("Output").innerHTML = textfield;
document.getElementById("Output").innerHTML = "Did not understand field: " + textfield[textfield.length-1];
};
}
'''