Re: Getting keyboard state.



"Timothy M. Shead" <tshead k-3d com> writes: 
Rather than creating handlers and maintaining state for this, you can get the
information along with the pointer position from anywhere in your code:

int x, y;
GdkModifierType modifiers;
gdk_window_get_pointer(window, &x, &y, &modifiers);

... the modifier keys will be OR-ed together GdkModifierType values.


Maintaining the state is much more correct, the get_pointer() solution
is a giant race condition.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]