Ed,
>>ekp is just a variable to check the number of keystrokes. When it reaches 5 an enter key is automaticaly pressed and the variable ekp is set back to 0.
>
>Do backspaces count as keystrokes?
Yes, they count and they should not. They should also be only digits, not characters. I think, it's necessary additional check here. And I also don't like an idea of public variables. I'd better make this variable to be a class property.
If it's not broken, fix it until it is.
My Blog