Button
https://processing.org/examples/button.html
Keys
https://processing.org/examples/keyboardfunctions.html
There are more examples
Example
(see also below)
you can get an input in the above example by
result = result + key;
if (key==RETURN || key==ENTER) {
// input is entered, proceed with next variable result2
}
I like Scratch and I think processing is useful to go on from Scratch, so welcome!