Change keypress to keycode