Hi! I am wanting to make a "Command Line" type thing using a Touch TFT and a PS2 Keyboard. I understand this
Type Letter On Keyboard> Print letter on keyboard
I also get
Type Letter On Keyboard> Go to another screen or tab
But what about....
Type letter on keyboard, then a word, then a entire SENTENCE> Press ENTER on Keyboard, and THAT ENTIRE word or phrase does something!!!
Just wondering about your thoughts on this!
the usual way of doing this is that you keep a buffer of "stuff the user has typed so far", and after each keypress you work out if what's in the buffer is a command you recognise.
More generally, your problem is parsing an input stream. This is a big area in computer science, and it's a problem that has been addressed many, many times.
Google "how to parse input" or "LALR parser" and prepare to jump down the rabbit-hole.