Re: [elinks-users] Ctrl-C -- possible to make it not quit ELinks?
Jonas Fonseca [EMAIL PROTECTED] writes: Ctrl-C is sadly hardcoded deep down in the code and thus does not allow this keycombo to be overwritten. The following patch for ELinks 0.11.4rc0 attempts to prevent Ctrl-C from causing SIGINT while ELinks is using the terminal. I am not going to push it to Git, but it may be useful for people who want this behaviour. diff --git a/src/terminal/kbd.c b/src/terminal/kbd.c index d72aab5..1b6a4f7 100644 --- a/src/terminal/kbd.c +++ b/src/terminal/kbd.c @@ -220,6 +220,7 @@ setraw(int fd, struct termios *p) if (p) copy_struct(p, t); elinks_cfmakeraw(t); + t.c_cc[VINTR] = _POSIX_VDISABLE; t.c_lflag |= ISIG; #ifdef TOSTOP t.c_lflag |= TOSTOP; ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users
[elinks-users] Ctrl-C -- possible to make it not quit ELinks?
I picked up the habit of using Ctrl-C to close unresponsive connections while using w3m. Now that I'm using ELinks more more, occasionally I make the mistake of hitting Ctrl-C, which will close an ELinks session along with all open tabs without warning. I'm re-training myself to use z, which is currently mapped to Abort connection. But would like to find a way to prevent accidentally closing ELinks in this way. Adding the Ctrl-C binding to Abort connection made no difference. In the list archives I found: If you do e.g. stty intr undef so that Ctrl-C does not give ELinks a signal, then ELinks will handle it as a bindable key. http://linuxfromscratch.org/pipermail/elinks-users/2006-December/001384.html But this disables the functionality of Ctrl-C altogether within the terminal. Are there any other options? Regards, John -- John Magolske http://B79.net/contact ___ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users