[IGSTK-Users] where is the code that interprets the mouse gestures?

sebastian ordas sebastian.ordas at gmail.com
Sun Jul 6 17:25:22 EDT 2008


Hi Ray,

this may depend on what you want to do with the shift and ctrl keys

for instance, if you are developing your application using FLTK as
GUI, and you would like to assign a specific  action to these keys,
you will have to override the handle (int event) method in your
FL_Window or Fl_Group class. In your case, the FL_KEYUP event.

int MyAppFLTKView::handle(int event)
{
     switch (event)
     {
        case FL_KEYUP:
            if  (Fl::event_state() == FL_SHIFT) // or  FL_CTRL
            {
                   // do something

                   // return 1 to effectively override the normal
trayectory of the key up event
                 damage(1);
                 return 1;
           }

        default:
          // leave the event flow normally
          return Fl_Group::handle(event);
      }
}

something similar applies if using QT


Let us know a bit more about your intended application

best regards,
sebastian



More information about the IGSTK-Users mailing list