News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Editor hooks

Started by artoj, November 28, 2007, 03:42:02 PM

Previous topic - Next topic

artoj

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