prevent keyboard mashing