- Subject: Re: mouse event in SLang_read_line
- From: Kikutani Makoto <kikutani@xxxxxxxxxxxxxx>
- Date: Wed, 25 Aug 1999 23:20:40 -0400
Sorry for delayed response.
On Thu, Aug 19, 1999 at 03:52:48AM -0400,
"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> kikutani@xxxxxxxxxxxxxx <kikutani@xxxxxxxxxxxxxx> wrote:
> >But even though a default value is provided at the mini buffer,
> >I should press ENTER. I'd be happy if SLang_read_line can recognize
> >a mouse click as ENTER key.
>
> After calling
>
> int SLang_init_readline (SLang_RLine_Info_Type *rli)
>
> use rli->keymap as the keymap argument to the SLkm_define_key
> function to bind the mouse key, e.g.,
>
> static int mouse_cmd (void)
> {
> /* Discard mouse info */
> (void) SLang_getkey ();
> (void) SLang_getkey ();
> (void) SLang_getkey ();
>
> (void) SLang_ungetkey ('\r');
> }
>
> .
> .
> SLang_init_readline (rli);
> SLkm_define_key ("\033[M", mouse_cmd, rli->keymap);
It worked!
Thank you.
makoto
--
Kikutani, Makoto kikutani@xxxxxxxxxxxxxx
[1999 date index]
[1999 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]