[openbox] A little direction requested = triggering action from overall window input events

Paul G paulg at perforge.net
Wed Jun 27 02:03:38 EDT 2018

If this is running on Linux, what you want to do is use the Linux
kernel's generic input api (see
https://www.kernel.org/doc/html/v4.13/input/input_uapi.html ).
Basically, all you'd need to do is implement listening for the correct
protocol (mouse or multitouch depending on how your touchscreen's
driver works) and point it at the right device in the /dev/input tree.
It may seem daunting, but it's actually trivial in comparison to doing
this through X and has the added bonus of triggering your code even if
nothing besides the kernel and rudimentary userspace is alive and
working. There's a very simple utility called 'evtest' - it lists all
the input devices and lets you monitor them, so all you'd need to do
to figure out how your devices works and what you should listen to is
point evtest at your touchscreen, tap and see what evtest says. As far
as writing your code, there's a python module called 'python-evdev'
that should make it very easy. evtest itself weighs in at less than
1.5k sloc of easily readable code if you want this done in C. You'll
have it done this way days before you've finished reading enough about
doing it through X to get started.


On Fri, Jun 22, 2018 at 10:51 AM, Jay Lawrence <jayjlawrence70 at gmail.com> wrote:
> Hi OpenBox community,
> Apologies in advance if I’ve misdirected this question. I don’t need an answer pre se but would appreciate any pointers where to focus my search. This area is way out of my expertise and theres a lot of possible directions to go here. I’ll report back my solution once done.
> The use case is we have Chrome running under OpenBox and the app is deployed to a public setting running full screen on a touch screen device. I want to create a “special tap sequence" that will trigger an action … a different app will open over top of Chrome  to provide admin functions. (pass code protected of course).
> The “special tap sequence” could be 2 tap/click upper left, 1 tap’click lower right, and 2 tap/click lower left all within 10 seconds time. Then a new app would start,  over top of Chrome with its first function to require the entry of the unlock code. Then it does stuff like reboot, shutdown, status info, etc.
> What I’d like to know is what part of the X / Window Manager environment  would I look to to implement this. I expect that the Window Manager is processing all X input events and then forwarding the relevant events to the underlying app like chrome. Is there some way to implement my feature in OpenBox?
> Or do I look for a “click/tap jacking” app that will run over top of Chrome and it will implement my trigger and action.
> Maybe this app exists and I just need to install/config it. I’m at a loss for keywords to search with.
> In any event, I want to avoid implementing in the Chrome environment because if Chrome fails to start I still need to have this admin feature available.
> Any direction is appreciated.
> Many thanks in advance,
> Jay
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox

More information about the openbox mailing list