Actions
Bug #5626
closedio/console: Cannot disable raw mode
Description
There doesn't seem to be a way to disable tty raw mode from within a Ruby script. The tty can be stuck in raw mode on script termination if IO.console.raw! is used, or if a raw command like IO.console.getch is in a thread that is terminated.
The documentation recommends following IO.console.raw! with #raw { ... } to restore the terminal, but this does not restore the terminal, either if IO.console.raw! is used or if a raw command is interrupted.
While I can use an external command like system("stty -raw"), I would rather be able to do this within IO.console. I can disable echo with IO.console.echo=, but that doesn't affect the raw mode.
Actions
Like0
Like0Like0