convert keydown in keypress