Re: [linux-audio-dev] Howto grab keys?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Howto grab keys?
From: Paul Davis (paul_AT_linuxaudiosystems.com)
Date: Fri Aug 20 2004 - 15:42:18 EEST


>On Fri, 20 Aug 2004 12:56:00 +0200
>Pamplemousse_mk2 <pamplemousse_mk2_AT_netcourrier.com> wrote:
>
>> Does anybody knows some internet sites, or some other libraries, or some
>> methods (perhaps multithreads? seems to be heavy for just event
>> managements...). I have look at ncurses docs but they shows an example
>> with a kind of loop like the one I just talk about above. Any advice is
>> welcome
>
>man select
>man poll

if simply getting ascii characters from ncurses is enough, then this
message doesn't matter. but if you start to want to use modifiers
combined with keys (e.g. Alt-a, Ctrl-F1), you need to move beyond the
normal ncurses model.

if you take a look at the ardour ncurses front end "ardour/ksi", you
will find a relatively small app that does something pretty close to
what you are thinking about. the key element is setting up the tty in
medium-raw mode so that you can get actual key events from the
keyboard rather than ASCII chars the way that ncurses normally does.

try browsing CVS at:

   http://ardour.org/cgi-bin/viewcvs.cgi/ardour/ksi_ardour/

and take a look at physical_keyboard.cc and ksi.cc to get an idea of
what i am talking about.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Aug 20 2004 - 15:46:31 EEST