keypress and blur returning values and indexes