Re: [linux-audio-dev] Re: C++ Keyboard Event Handling

From: Cedric Roux <Cedric.Roux@email-addr-hidden>
Date: Fri Jan 20 2006 - 14:49:35 EET

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.
Received on Fri Jan 20 16:15:09 2006

This archive was generated by hypermail 2.1.8 : Fri Jan 20 2006 - 16:15:09 EET