add keypress functions