124
0 vote vote

[ Resolved ]

Allow keyboard short-cuts to be overridden

Description

HI,

I am trying to bypass the Ctrl-F shortcut, which brings up the Find dialog box (I need to override this, because there are other non-HTMLEditor screens that I want to offer a consistent Find/Replace interface for).

I am trapping the keydown event at the form level, with KeyPreview set to true, but the HTMLEditor is capturing the keystrokes before they can be previewed by the form (when the htmleditor control does not have focus, this mechanism works fine).

Please advise if you are able to include this functionality in a future release, and/or any know work arounds. The advised method (capturing the keydown event and setting the Cancel property of the EditorKeyEventArgs) is not working, and elicits the following message chain:

'SpiceLogic.WinHTMLEditor.EditorKeyEventArgs.Cancel.set'

'SpiceLogic.WinHTMLEditor.HTMLEditor.x0074c19228fcb15d'

'System.Windows.Forms.HtmlShim.FireEvent'

'System.Windows.Forms.WebBrowserBase.PreProcessMessage'

'System.Windows.Forms.Control.PreProcessControlMessageInternal'

'System.Windows.Forms.Application.ThreadContext.PreTranslateMessage'

'System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop'

This is called from the following code:

Private Sub HtmlEditor1_KeyDown(ByVal sender As Object, ByVal e as SpiceLogic.WinHTMLEditor.EditorKeyEventArgs) HandlesHtmlEditor1.KeyDown

If e.CtrlKey And e.KeyCode = 70 Then

e.Cancel = True

EndIf

End Sub
Please feel free to share your comment.
loading...