add key event listener

allows using the "done" button on IME for input