Use raw instead of cbreak mode in curses.
This allows binding keys that would otherwise be catched and interpreted
by the terminal like \Cc
, \Cy
or \Cz
.
To still allow suspending and interrupting mutt, suspend
and interrupt
functions
are implemented.
suspend
will simply signal our process group with SIGTSTP
. It is bound to \Cz
by default.
interrupt
calls mutt_query_exit
and is bound to \Cc
.
This should keep the behavioural changes to a minimum.
Since the Yes/No query doesn't allow keybindings it temporarily switches
to cbreak
instead of raw
mode. This will allow the terminal to interpret interrupt and stop / suspend key sequences for us. They might not match the configured key sequences.
Such a hack might be needed at more places I'm not aware of.