Entering 3 digits

Of course, using the String class to collect a fixed number of characters is not necessary. Doing so will make it difficult to implement a backspace key.

A 4 element char array and an index would be much better - 3 characters and a NULL terminator. Increment the index each time you add a character and NULL. Decrement the index each time the backspace key is pressed.