echo input character using blessed and cbreak

129 views Asked by At

Writing a python script, I use blessed module to input a single character without having to press on Enter key. Unfortunately, the character input is not echoed

term = Terminal()

with term.cbreak(): 
   key= term.inkey()
....

Is there a way to get input character echoed ? Thanks !

1

There are 1 answers

0
Ray Gllisse On BEST ANSWER

Well, no magic answer :-) I guess I'll just add a print(key) after each inkey() call