Fix cursor keys not working in some terminals.
This commit is contained in:
parent
ce8ac8f6e1
commit
b1efb0ff28
1 changed files with 1 additions and 0 deletions
|
|
@ -71,6 +71,7 @@ def interactive():
|
|||
new_settings[3] = new_settings[3] & ~termios.ECHO & ~termios.ICANON
|
||||
new_settings[6][termios.VMIN] = 0
|
||||
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, new_settings)
|
||||
sys.stdout.write(ESC + "[?1l") # Ensure normal cursor key codes
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue