bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can you use getch() without all the other stuff?


From: Avery Pennarun
Subject: Re: Can you use getch() without all the other stuff?
Date: Thu, 27 Dec 2007 15:20:40 -0500

On 24/12/2007, Steve Litt <address@hidden> wrote:
> Is there a way to use ncurse's getch() without loading up all the other
> ncurses stuff? I'd like to read raw (I'd really like to be able to read
> scancodes but I don't think getch() does that), but without the memory leaks
> and overhead of screen manipulation.

You probably don't need ncurses for this at all.  Just put the tty
into raw mode (equivalent of "stty raw") and use the standard stdio
functions to read bytes.

If you really want "scan codes", look at the Linux kbd_mode command.
Beware that these probably are not *actually* what you want :)

Have fun,

Avery




reply via email to

[Prev in Thread] Current Thread [Next in Thread]