admb-project / admb

AD Model Builder
http://admb-project.org
Other
64 stars 19 forks source link

Unable to use CTRL-C, 'n' and 'q' keyboard commands in Cygwin and Msys2 shells #112

Closed johnoel closed 5 years ago

iantaylor-NOAA commented 5 years ago

This block of code seems to only be implemented for Microsoft Visual C, but I don't know the history of that: https://github.com/admb-project/admb/blob/2044772105969a2ee6400c2fe961c2d754d64fa0/src/linad99/newfmin.cpp#L62-L86

johnoel commented 5 years ago

Yes, it should be defined for Windows.

johnoel commented 5 years ago

If you are using cygwin or msys2 shell, it uses mintty in the terminal which does not correctly pass ctrl-c to the executable.

To workaround it, prefix winpty to run the program.

ie

$ winpty ./n2mvol.exe

Ctrl-C should now work.

The other alternative is to run the program using the stock Windows Command Prompt.

There is no solution for fixing this within admb, it is an issue with the shell.

https://github.com/mintty/mintty/issues/684