LCDproc development and user support list

Text archives Help


[Lcdproc] Grabbing all 6 keys for one client


Chronological Thread 
  • From: dplatt at radagast.org (Dave Platt)
  • Subject: [Lcdproc] Grabbing all 6 keys for one client
  • Date: Tue, 29 Jan 2013 17:20:39 -0800

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.

Years ago, this worked fine. Because it wants to use keys
that are normally reserved by LCDproc for controlling the
client display (e.g. scrolling between clients, starting
and stopping rotation) it was necessary to use a feature
in the configuration [input] section to "free" these keys
from their normal binding, and make them available to clients
such as mine.

Well, that no longer works. The [input] section no longer
exists, and there's no longer a way to "free" the primary
key bindings. My client can never actually get keypresses
for any buttons other than the (O) or "enter" key, and this
isn't sufficient for me to control it well.

My hope is that there's another way to "un-bind" these five
keys from their usual use (controlling client display) and
leave them available for direct use by the clients. I'm
not sure what it is - can somebody suggest the best way
to do this?

One way which I think *might* work, would be to go into
the [CwLnx] section of the configuration, and specify
bindings for the "reserved" functions to key codes that
don't actually exist (e.g. to "N" and "Y" and "Z", rather
than to the "A" through "F" codes that the CwLnx keypad
generates). Doing this would seem to be technically
"illegal" according to what I see in the documentation, but
from looking at the way the code actually works it seems
as if it might do what I want even if it's a hack.

Is there a cleaner, less hacky way of telling LCDproc
that I truly want the "A" through "F" key codes to be
passed through to clients, and not grabbed on the way
for screen-rotation control?






Archive powered by MHonArc 2.6.18.

Top of page