Ask coding questions

← Back to all posts
How to get keyboard input without pressing enter?
Tejasnarula

So I am creating a game with python, I want to get the keyboard input that is arrow keys without pressing enter.
like without using input() function that you need to enter the value and then hit enter.

I just want a key input.

repl.it is not allowing to use keyboarded library.

Is there any other way I can get keyboarded input?

Answered by VulcanWM [earned 5 cycles]
View Answer
Voters
Tejasnarula
Comments
hotnewtop
VulcanWM

You can try using this:
https://pypi.org/project/getkey/

Tejasnarula

@VulcanWM Thanks for help ,it worked. now I can make my game!

VulcanWM

yay, can u mark the comment as the answer @Tejasnarula

Tejasnarula
VulcanWM

The check mark icon next to my name @Tejasnarula