enter-workaround quest 2

This commit is contained in:
Leon van Kammen 2024-10-28 12:25:03 +00:00
parent 4105cbda09
commit 5aeb860aef
1 changed files with 9 additions and 0 deletions

View File

@ -1340,6 +1340,15 @@ VT100.prototype.setupTouchInputFallback = function(){
this.form.appendChild(this.input)
this.scr_.parentElement.appendChild(this.form)
this.input.addEventListener('blur', () => {
if( this.input.value != '' ){
ch = '\n'
this.key_buf_.push(ch);
setTimeout(VT100.go_getch_, 0);
this.input.value = ''
}
})
this.input.addEventListener("keydown", VT100.handle_onkeypress_, false);
this.input.handler = (e) => {