Nate: > My current problem is that key presses are eaten by Scintilla. For > example, when I press Ctrl+S, Scintilla produces a character and the > Eclipse window never receives the keystroke, so the save action is not > triggered.
This is normally handled in Windows applications with a call to TranslateAccelerator in the applications event loop so it is handled before Scintilla can see it. You should have a look at Eclipse's base event handling to work out how this is performed. > I would like to forward all keypresses that Scintilla does > not handle to the Eclipse window so the appropriate actions can be > taken. How would I go about doing this? First look at what Eclipse wants. This is not normally done by forwarding events. > I tried subclassing the Scintilla window but this approach requires me > to handle every key *before* Scintilla gets a chance. I don't want to > try and handle Ctrl+S and the thousand other Eclipse key combinations. I > would rather let Scintilla decide to handle the key and if it does not, > then give Eclipse a chance. What benefit does this give over the standard mechanism where the application decides which keys it wants to handle? > For testing purposes, when Scintilla's wndproc receives a Ctrl+S > WM_KEYDOWN message, I trigger the save action and I do *not* call the > orginal wndproc. The document saves but the Ctrl+S character still > appears in Scintilla, even though Scintilla never got the WM_KEYDOWN > message. What messages do I need to block to avoid having the key > combination characters appear in Scintilla? Are you returning 0 from your procedure and not calling DefWindowProc? > If what I need is not possible with Scintilla's current API, can you > point me in the right direction on where I would need to modify > Scintilla's source to acheive this goal? WM_KEYDOWN and WM_SYSKEYDOWN are the correct place to intercept key events. Neil _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
