TouchCursor under Linux ; I can't believe there is no way to do that
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
display
Specifies the connection to the X server.
grab_window
Specifies the grab window.
keyboard_mode
Specifies further processing of keyboard events. You can pass GrabModeSync or GrabModeAsync.
owner_events
Specifies a Boolean value that indicates whether the keyboard events are to be reported as usual.
pointer_mode
Specifies further processing of pointer events. You can pass GrabModeSync or GrabModeAsync.
time
Specifies the time. You can pass either a timestamp or CurrentTime.
What is the "grab window" and owner_events, and why does it need to know the time?
Distribution: Several (Gentoo, Red Hat/Fedora, HP-UX, Helix)
Posts: 26
Rep:
Quote:
Originally Posted by MTK358
From the XGrabKeyboard man page:
Code:
display
Specifies the connection to the X server.
grab_window
Specifies the grab window.
keyboard_mode
Specifies further processing of keyboard events. You can pass GrabModeSync or GrabModeAsync.
owner_events
Specifies a Boolean value that indicates whether the keyboard events are to be reported as usual.
pointer_mode
Specifies further processing of pointer events. You can pass GrabModeSync or GrabModeAsync.
time
Specifies the time. You can pass either a timestamp or CurrentTime.
What is the "grab window" and owner_events, and why does it need to know the time?
all XEvents are supposed to have a timestamp. It's so that events can be handled asynchronously and there is some indication as to the sequence of events. The grabbing window would most likely be *your* window. I'm not sure if your window can both grab the keyboard and remain hidden, but it's worth a try. I don't think it's possible to do anything without at least creating a widget. You may have to map it as well, and then hide it after grabbing the keyboard. You'll just have to try some things and see what happens.
Distribution: Several (Gentoo, Red Hat/Fedora, HP-UX, Helix)
Posts: 26
Rep:
Quote:
Originally Posted by MTK358
How do I create a "Time"?
And what's "owner_events"?
I think a "Time" is just a time_t, so maybe:
Time t = time();
I don't remember for sure.
And owner_events looks like it should be True for what you want. It looks like it's asking whether you want the events to be sent or not. Perhaps it's possible to use some method other than event processing to get the status of the keyboard. I don't know for sure, I tend to test things when I'm not sure, as sometimes the Xlib documentation is somewhat cryptic.
Hope that helps some.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.