[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grabbing Escape key
From: |
Dan Nelson |
Subject: |
Re: Grabbing Escape key |
Date: |
Tue, 13 Jan 2009 23:43:42 -0600 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
In the last episode (Jan 14), Dave Wood said:
> How do I use the escape key in an input routine? I looked in
> ncurses.h but didn't see anything there except ESCDELAY.
>
> I tried using 1 as a keycode but that doesn't seem to be working:
>
> int c = getch();
> switch(c)
> {
> case 1:
> return;
> }
getch should return 27 when ESC is pressed. What do you see being
returned when you hit ESC?
--
Dan Nelson
address@hidden