keyPress event for mac