Hi All, I'm trying to make my GUI key-sensitive and added some lines like: BindKey(this, gVirtualX->KeysymToKeycode(kKey_o), kAnyModifier); in the constructor of my TGMainFrame and added a function like: Bool_t TestMainFrame::HandleKey(Event_t *event) { // Here we handle all keys... char tmp[10]; UInt_t keysym; gVirtualX->LookupString(event, tmp, sizeof(tmp), keysym); cout<<"Hmmm... think someone pressed a key..."<<endl; switch ((EKeySym) keysym) { case kKey_o: cout<<"o pressed..."<<endl; break; default: break; } return kTRUE; } Now unfortunately after pressing a key, this function is called twice! Has anybody experienced the same problem and found a solution? I modified and attached the guitest-example for handling the keys m and o to illustrate the bug. All modifications in the file are marked by ... /////////////// <- new Thanks, Andreas ---------------------------------------------------------------------- Andreas Zoglauer MPI fuer extraterrestrische Physik Phone: +49/89-30000-3848 Postfach 1312 Fax: +49/89-30000-3569 85741 Garching, Germany Email: zog@mpe.mpg.de ----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:49 MET