DavidGriffith / frotz

Infocom-style interactive fiction player for Unix and DOS (moved to https://gitlab.com/DavidGriffith/frotz)
GNU General Public License v2.0
209 stars 64 forks source link

Ctrl c dont exits #13

Closed ramn closed 7 years ago

ramn commented 8 years ago

As discussed in https://github.com/DavidGriffith/frotz/issues/11

dchapes commented 8 years ago

Please don't change my Ctrl+C behaviour. I've left the default stty control codes alone and I expect hitting the interrupt key to, you know, interrupt the terminals currently running program.

ramn commented 8 years ago

@dchapes that is not true - try hitting ctrl-c in vim or emacs for example. It won't terminate the application. Neither should it necessarily terminate frotz.

Arguably, in an application where the user has significant unsaved work, terminating the application using a shortcut with no confirmation is bad UX.

DavidGriffith commented 8 years ago

For some reason Frotz uses cbreak() mode. Right next to that call are comments that we're doing raw input mode. It was like that since 2.32r2. I think it would be better to use raw mode and go from there.

DavidGriffith commented 7 years ago

I'd rather not stop Ctrl-C from exiting Frotz by messing with signal processing. See #37. I plan to make Frotz work in raw mode. I'm not sure why Galen Hazelwood chose to use cbreak mode when creating the Unix port from the original DOS version.