client keypress handler