Changed max limits bug
Keypress function