previous up next     contents index
Next: wxKeymap::AddMouseFunction Up: wxKeymap: wxObject Previous: wxKeymap::wxKeymap

wxKeymap::AddKeyFunction

  void AddKeyFunction (char *name, wxKeyFunction func, void *data)

Names a new function to handle keyboard events. If there was already a function mapped to this name, it will be overridden. The namespaces for key and mouse event handlers are separate.

The form of a wxKeyFunction is:

typedef Bool (*wxKeyFunction) (wxMediaBuffer *edit, wxKeyEvent& event, void *data)

The data pointer is passed on to the wxKeyFunction function when it is invoked. If the function is invoked and returns FALSE, then the event will be handled by the default handler (defined in the object using the keymap).



PLT