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

Parke parke.nexus at gmail.com
Fri Jun 22 13:32:16 EDT 2018

On Fri, Jun 22, 2018 at 7:51 AM, Jay Lawrence <jayjlawrence70 at gmail.com> wrote:
> 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.

Hello, Jay,

If you can write Python, you might want to look at the Python XLib libary.




It is possible, via C (and possibly also via Python?), to monitor all
X events *without* intercepting (i.e. consuming/blocking) them.  I
forget the exact API that allows you to do this.  It might be the
XTEST extension to X windows.  (Or maybe XRECORD?)  I have written a
C++ program that does extensive monitoring of X key press events.  I
don't have access to the source code right now, but I should be able
to look at it later today.  I would expect monitoring of mouse and
touch events to be very similar.  At some point I switched from Python
to C++ because the Python libraries did not expose all the X Windows
APIs that I needed.

Some of my older Python scripts, from back before I switched to C++,
might be a better template for you to start from than the above linked
xinput.py.  Like my C++ source code, I don't have access to it right
now, but I should later today.



More information about the openbox mailing list