Re: Grabbing all 6 keys for one client

Martin T Jones <[email protected]> Wed, 30 Jan 2013 17:24:22 +0000
Newsgroups gmane.comp.sysutils.lcdproc
Message-ID <[email protected]>
On 30/01/13 01:20, Dave Platt wrote:
> My LCDproc setup includes a client I wrote some years ago,
> which turns the (headless) PC into a small recording station.
> During normal operation, it's operating at a "normal"
> priority, and it has reserved only one key for its own
> use.  Its display (when rotated into visibility) simply
> says "Recorder.  Press (O) to start." and this key
> (the "Enter" key) is reserved by the client.
>
> When the client gets this particular key code (and this
> much works well), it raises itself to high priority to
> stop display rotation, and then attempts to reserve all
> six keys on the CwLnx display ("A" through "F") exclusively.
> It then uses all of these keys for its own screen
> navigation (changing modes, increasing and decreasing the
> intended recording time, starting and canceling recordings).
>
> When the user is done and cancels out from the "Start a
> recording?" subscreen, it releases the reservation on all
> of the five keys other than the "enter" key, drops its
> priority to normal, and goes back into rotation.
>    
The best way to do this is to reserve all the keys the client needs in 
shared mode, there is no need to release them, see:

client_add_key [ -exclusively | -shared ] key...

in section:

http://lcdproc.sourceforge.net/docs/current-dev.html#language-menus

LCDd reserves most of the keys it uses in shared mode, only the menu key 
is reserved exclusively.