I want to check if the user pressed down the Shift key when the program starts. (That means, press down the Shift key before the program is started) It\'s
I have found a very simple way through gtk/gdk.
int main ( int argc, char *argv[], char *env[] ) { gtk_init(&argc, &argv); GdkModifierType button_state; gdk_window_get_pointer(NULL, NULL, NULL, &button_state); if(button_state & GDK_CONTROL_MASK) { printf("ctrl key is pressed"); } }