My suggestion would be to NOT use number at all, and just use keyboard_string for everything. The backspaces would automatically just work if you do that, without any need for extra code. For the string_digits part, you can do:
keyboard_string = string_digits(keyboard_string);
you would also just draw keyboard string and not number as well