-1

So first I want to capture the keys (w,a,s,d) when are pressed. And I think with curses I can make it, but I am new using python, and I need help, How capture the key pressed in the keyboard. I try with a input but I need touch enter to change, but in my program I don't need pressing enter. I just need when I press, for example w do something without pressing enter.

  • You need to make your question a bit more clear & also, show what you have tried so far. – Alok May 14 '14 at 03:10

1 Answers1

0

window.getch() is what you're looking for. It may help to browse through the documentation, as all these basic things are clearly stated there:

https://docs.python.org/3.3/library/curses.html#curses.window.getch

chtenb
  • 14,924
  • 14
  • 78
  • 116