0

I am currently using getch, getkey and the getstr functions from the curses module and have found them not user-friendly. Why?

  1. They are all slower to detect a keypress than the python input() function.
  2. You have to hold the key down for longer than the usual press-down to make the program recognise it.

In my scenario though, I have a curses window, so I don't know how to, or if it's possible to use non-curses functions on it. I would like to know if there is a way of using the input() function on the curses window or just be able to position the input for the user to enter text.

If it's not possible, can you please provide an alternative. Thanks!

Note: The user has to be able to see what they are typing as well.

    view = curses.newwin(1,1,15,10)

    #Get user request even with curses window
    data = input()

0 Answers0