How to get keyboard input without typing enter