Author Topic: Editor hooks  (Read 5233 times)

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Editor hooks
« on: November 28, 2007, 03:42:02 pm »
Hi,

I need some help with hooking to the editor. I need to do the following things:

  • Get editor's special key events (Escape, Backspace, Return etc.) to my plugin and consume (i.e. not let others, even the editor, to catch them) if necessary
  • Get editor's character key events to my plugin and consume them if necessary

So I first looked the EditorHooks class. I was unable to get the wxEVT_SCI_KEY to fire. wxEVT_SCI_CHARADDED works but I can't consume it (and it fires too late).

I then tried hooking to the editor using wxEVT_KEY_DOWN. It works fine but because it works on keys it doesn't support all (special) characters I need. I tried using wxEVT_CHAR but it doesn't fire.

    Arto