The keyboard on one analog pin does not work

That is because that is all your code tells it to do. In order to do more you need not only to code the removal of the original digit and show it one place to the right but also you need to decide what will indicate you have finished a multi digit number.

While you can identify different keys by looking at the voltage you can only do this if only one key is held down at any one time. This is a limit of this design. If you hold two or more the the result will be consistent but rubbish.