Re: Getting keyboard state.
- From: Havoc Pennington <hp redhat com>
- To: "Timothy M. Shead" <tshead k-3d com>
- Cc: Philip Kendall <pak ast cam ac uk>, GTK+ faq <gtk-app-devel-list redhat com>
- Subject: Re: Getting keyboard state.
- Date: 12 Jan 2001 17:51:21 -0500
"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]