/* Binary search keyboard for typing with the touchscreen */ function showChars(x,chars) { var lines = Math.round(Math.sqrt(chars.length)*2); g.setFontAlign(0,0); var sy = Math.round(200/lines); var sx = sy; g.setFont("Vector", sy-2); var y = (240 - lines*sy); var last = 0; for (var i=0;i { clearWatch(); show(charl,callback); }, BTN4); setWatch(() => { clearWatch(); show(charr,callback); }, BTN5); } function getCharacter() { return new Promise(resolve => { show("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",resolve); }); } getCharacter().then(print)