if (noDefault) { event.flags |= NS_EVENT_FLAG_NO_DEFAULT; }
gint handle_key_press_event_for_text(GtkObject *w, GdkEventKey* event,                                     gpointer p){  nsTextWidget* win = (nsTextWidget*)p;  // work around for annoying things.  if (event->keyval == GDK_Tab)    if (event->state & GDK_CONTROL_MASK)      if (event->state & GDK_MOD1_MASK)        return PR_FALSE;  NS_ADDREF(win);  nsKeyEvent keyDownEvent(NS_KEY_DOWN, win);  InitKeyEvent(event, keyDownEvent);  win->OnKey(keyDownEvent);  // Don't pass Shift, Control, Alt and Meta as NS_KEY_PRESS events.  if (event->keyval == GDK_Shift_L      || event->keyval == GDK_Shift_R      || event->keyval == GDK_Control_L      || event->keyval == GDK_Control_R      || event->keyval == GDK_Alt_L      || event->keyval == GDK_Alt_R      || event->keyval == GDK_Meta_L      || event->keyval == GDK_Meta_R     )    return PR_TRUE;  //  // Second, dispatch the Key event as a key press event w/ a Unicode  //  character code.  Note we have to check for modifier keys, since  // gtk returns a character value for them  //  nsKeyEvent keyPressEvent(NS_KEY_PRESS, win);  InitKeyPressEvent(event, keyPressEvent);  win->OnKey(keyPressEvent);  NS_RELEASE(win);  if (w)  {    gtk_signal_emit_stop_by_name (GTK_OBJECT(w), "key_press_event");  }  return PR_TRUE;}