I am trying to create a input box as shown below. For this reason, I have wrote below code but whenever I press enter
key, it should not take any word, lke whenever you press enter key on the username input box it will swtich to the password input box. But, I have not found how I can make the input box s sensible to enter key. How can I do ?
import curses
import curses.textpad
stdscr = curses.initscr()
curses.noecho()
curses.cbreak()
stdscr.keypad(1)
stdscr.clear()
stdscr.refresh()
win = curses.newwin(5, 20, 5, 10)
tb = curses.textpad.Textbox(win)
text = tb.edit()
visualization :
|-----------------------------|
| |
| |------| | // input box for taking username
| |------| |
| |
|-----------------------------|