I'm using readline in an application that follows the input realtime. I don't want to allow the user to press Enter, Control + J, or any other equivalent, and thus unintentionally clearing the field.
I'm actually forwarding the keys myself, so I can catch and prevent certain key inputs, but I don't think this is the way to go because reverse search (Control - R) must also be handled.
I've looked over the gnu docs, but haven't found anything useful.
My code is similar to this https://github.com/ulfalizer/readline-and-ncurses