This should be controlled from the outside, otherwise handling loss of focus vs. hiding becomes ugly. And instead of Ctrl-C, Ctrl-D and Esc deactivating readline, it should instead be possible to subscribe to key-events not handled by readline, so that they can be externally wired up as deactivation triggers and still be marked as handled without users of readline having to resort to external keyhandling. That also means that commands could be wired up to readline ctrl sequences.
This should be controlled from the outside, otherwise handling loss of focus vs. hiding becomes ugly. And instead of
Ctrl-C
,Ctrl-D
andEsc
deactivating readline, it should instead be possible to subscribe to key-events not handled by readline, so that they can be externally wired up as deactivation triggers and still be marked as handled without users of readline having to resort to external keyhandling. That also means that commands could be wired up to readline ctrl sequences.