[linux-audio-dev] Re: C++ Keyboard Event Handling
Cedric Roux
Cedric.Roux at eurecom.fr
Fri Jan 20 12:49:35 UTC 2006
On Fri, 20 Jan 2006, Carlo Capocasa wrote:
> > SDL also has an alternative API that has this logic built in:
> > SDL_GetKeyState():
>
> Hm, I'm wondering if I could do this sticking to C++ builtins...
>
> Carlo
You can't. Getting the key is a I/O operation on the terminal.
Each terminal has its own language, which is out of the scope
of the standard C++ (well, at least I am sure of that for C,
C++ should be the same I guess).
You need to use some layer, like ncurses or something.
Or go to X Window where you can handle Key events.
Maybe SDL is good for that also (I don't know if it works for
terminals, check it).
Cédric.
More information about the Linux-audio-dev
mailing list