(11-10-2022, 08:36 PM)Pete Wrote: ...
The LINE INPUT statement is a bit buggy. I typed to the edge and it left a letter on the right margin on row down as it went back to begin line-2. Behavior continued. Typed 3 lines, but backspace was only able to go back 1 line.
Pete
Yeah, that bit of wwwBASIC is pretty borked.
Something I'd like to fix eventually, but I can't stare at javascript too long before getting really cranky.
The big problem with using a canvas element: useless for virtual keyboards (mobile devices and otherwise.) When you touch the canvas element, it is like mouse-clicking on it. So no way to trigger the virtual keyboard, and nothing to capture input from a virtual keyboard.
My fix right now is with the BAM statements:
Code: (Select All)
_PROMPT (message, defaultValue)
_CONFIRM (message)
_ALERT (message)
Not in love with that, but it will have to do for now.
I'm thinking of having the interpreter check for and confirm touchscreen devices, and automagically redirect the normal keyboard input statements to the mobile-friendly statements at runtime, so that we can stick with QBasic/QB64PE syntax, but the interpreter will just do the magic of running the other statements instead.
Hmmm, maybe that's what I should do with LINE INPUT. Redirect to _PROMPT all of the time...