anEvent.keyCode = nsConvertKey(aGEK->keyval) & 0x00FF;
void InitKeyPressEvent(GdkEventKey *aGEK,                       gpointer p,                       nsKeyEvent &anEvent){  //  // init the basic event fields  //  anEvent.eventStructType = NS_KEY_EVENT;  anEvent.message = NS_KEY_PRESS;  anEvent.widget = (nsWidget*)p;  if (aGEK!=nsnull) {    anEvent.keyCode = nsConvertKey(aGEK->keyval) & 0x00FF;    anEvent.charCode = nsConvertCharCodeToUnicode(aGEK);#ifdef DEBUG_pavlov    g_print("%s\n", aGEK->string);#endif    anEvent.time = aGEK->time;    anEvent.isShift = (aGEK->state & GDK_SHIFT_MASK) ? PR_TRUE : PR_FALSE;    anEvent.isControl = (aGEK->state & GDK_CONTROL_MASK) ? PR_TRUE : PR_FALSE;    anEvent.isAlt = (aGEK->state & GDK_MOD1_MASK) ? PR_TRUE : PR_FALSE;    anEvent.point.x = 0;    anEvent.point.y = 0;  }}