Getting keyboard modifiers state using Gnome libs (GDK) fetches initial state only
I'm trying to get the current keyboard modifiers state through gnome GDK or GTK library in aim to implement an accessibility gnome shell extension that shows that state. I know how to get thier state using xlib, but there is not full binding for gnome gjs. The code below get only the initial state. It does not update state. /* * compiling: gcc `pkg-config --cflags gdk-3.0` -o gdk_mod gdk_mod.c `pkg-config --libs gdk-3.0` */ #include <gdk/gdk.h> int main (int argc, char **argv) { gdk_init(&argc, &argv); GdkDisplay * disp; disp = gdk_display_open(NULL); if (disp!=NULL) g_printf("display