Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Abandoning treatment for X11 #1
I think I've done all that's possible to achieve with X11 API in this project, but there still remain a bunch of issues. This document is about what they are and why they may not be resolved as an X11 application.
Before we start with the issues, we need clarify the situation first.
There are three ways to grab key events in X11:
If you want to replay the key event you just grabbed, use
You cannot use
Note that if you replay a key event with
So here is the first issue.
When sending some key combination, one have to know the status of the modifier keys and adjust them, send the key, and then restore them. This is expected to happen in a very short period of time so the user won't notice. To accomplish this,
And the second issue.
And some other issues.
So the conclusion is that, while X11 provided some API for keyboard event operations, it is vague in documentation and working mechanism, and clearly not designed, nor suitable for translating key sequences into others. This may be the reason why almost no such project like this is known.
For an alternative API, some people in a mailing list suggested Atspi, which I haven't tried out myself.
Have you ever tried uinput?