OK, I found some kind of solution for control-y.

in reader_init() in reader.c, I added the line:

        shell_modes.c_cc[VDSUSP]=_POSIX_VDISABLE ;

This now allows control-y to be used. This line will work if termios.h  
is included. I'm not sure why I had this problem, so I don't know if  
this is THE correct solution.

Michael

---
void reader_init()
{

        tcgetattr(0,&shell_modes);        /* get the current terminal modes */
        memcpy( &saved_modes,
                        &shell_modes,
                        sizeof(saved_modes));     /* save a copy so we can 
reset the  
terminal later */
        
        shell_modes.c_lflag &= ~ICANON;   /* turn off canonical mode */
        shell_modes.c_lflag &= ~ECHO;     /* turn off echo mode */
     shell_modes.c_cc[VMIN]=1;
     shell_modes.c_cc[VTIME]=0;
        shell_modes.c_cc[VDSUSP]=_POSIX_VDISABLE ; /* to get control-y to  
work */

        al_init( &current_filename);
}
---

On 3 Apr 2010, at 10:37, Michael Lachmann wrote:

> I'm still trying to solve my problems with control-y.
> The problem is that control-y is not recognized. (Does anyone else
> have this problem?)
> Some more debugging showed me what fish is doing.
> while it is waiting for a key, it is on the line:
>    res = select( fd_max, &fd, 0, 0, 0 );
> in input_common.c in readb() . When select() exits, input should be
> available, and fish proceeds to
> read_blocked() in common.c, where it calls read().
>
> At least that is what is supposed to happen. For some reason, when I
> press control-y on my machine, select exits, but the next call to
> read() has no data available, so it blocks.
>
> I'm not sure why this happens, I'm actually not sure how fish does all
> its magic. It probably has to do with terminfo, and which keys are
> initialized in input_terminfo_init()...
>
> control-y seems to produce suspend in a program. When ctrl-y is
> entered, then the next time read() exits, a normal program suspends.
>
> Maybe I have the wrong ncurses installed? I have 5.4.... I installed
> fish initially through fink, though now I compile it.
>
> I don't know if this is a related problem, or not, but I also can't
> use esc-key for any key (usually, that would be esc-d...). I can use
> alt-key, though
>
> Michael
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Fish-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fish-users
>


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to