XGrabKey
- From: Mario Levinsky <levinsky mario gmail com>
- To: gtk-app-devel-list gnome org
- Subject: XGrabKey
- Date: Wed, 17 Aug 2005 20:42:51 +0000
Hi!
I would like to make possilbe in my gtk+ application using global hot keys,
I found xbindkeys application, and use part of its code.
Usage is simple:
first I call this
void grab_keys(Display *dpy, Keys_t *keys, int nb_keys);
and after that I catch XKeyEvent.
In xbindkeys it works,
in gtk application I use instead of dpy
gdk_x11_display_get_xdisplay(gdk_screen_get_display(gtk_window_get_screen(GTK_WINDOW(topLevelWindow))))
instead of XKeyEvent
"key_press_event" of topLevelWindow,
but I got strange result, I press key and my window has focus, I can catch
all keys with the exclusion of which I give grab_keys functions,
and when my window has no focus I can not catch anything.
Any help?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]