On Sat, Feb 24, 2001 at 04:09:58PM -0800, Guy Harris wrote:
> Some problems with the current version of the code:
An additional problem:
#include <X11/keysym.h>
Ethereal is both a Windows and a UNIX/X11 application, so it'd need to
handle raw keystrokes through GDK, not through any explicit access to X.
http://developer.gnome.org/doc/API/gdk/gdk-event-structures.html#GDKEVENTKEY
says:
struct GdkEventKey
struct GdkEventKey
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
guint state;
guint keyval;
gint length;
gchar *string;
};
Describes a key press or key release event.
GdkEventType type the type of the event
(GDK_KEY_PRESS or GDK_KEY_RELEASE).
GdkWindow *window the window which received the
event.
gint8 send_event TRUE if the event was sent
explicitly (e.g. using XSendEvent).
guint32 time the time of the event in
milliseconds.
guint state a bit-mask representing the
state of the modifier keys (e.g.
Control, Shift and Alt) and the
pointer buttons. See GdkModifierType.
guint keyval the key that was pressed or
released. See the <gdk/gdkkeysym.h>
header file for a complete list of
GDK key codes.
so you're not supposed to compare "event->keyval" against X keysym XK_
values, you're supposed to compare them against GDK_ key values from
<gdk/gdkkeysym.h>; that should work on X11, Windows, or any platforms
that might be supported by GTK+ in the future.