Josiah,
Thanks for your help to handle CTRL+ENTER.
However, I completed removed all the customization,
including CTRL+ENTER, and testing another requirement.
Basically, in my application, I had an MDIForm (Visual
Studio) which has got some menu like File, Edit, Open
and Save etc, each has got hotkey like "File Save" =
CTRL+S, "File Open" = CTRL+O like this.
Within this MDIForm, there are child forms, and Each
Child form contains one RichTextBox (Microsoft), and
one Datagrid.
When the cursor is either in RichTextBox (Microsoft)
or in Datagrid, whenever I press CTRL+S or CTRL+O, it
saves a file or opens a file.
I am trying to remove the RichTextBox (Microsoft) and
substitute with Scintilla. When I substitute
Scintilla, the CTRL+S or CTRL+O hotkey does not work
when my cursor is on Scintilla. On the other hand, if
my control is Datagrid, it is working fine.
It looks to me that when I press CTRL+S or CTRL+O
hotkeys, it goes to Scintilla and does not transfer to
parent MDIForm. Is there any setup or place where I
can turnoff Hotkeys from Scintilla.
With SCINTILLA document pages, I am seeing this
"SCI_NULL: The SCI_NULL does nothing and is the value
assigned to keys that perform no action. SCI_NULL
ensures that keys do not propagate to the parent
window as that may cause focus to move. If you want
the standard platform behavior use the constant 0
instead."
I am seeing this code in my scintilla wrapper.
public void AssignCmdKey(int km, int msg )
{
SPerform(2070, (uint)km, (uint)msg );
}
public void ClearCmdKey(int km)
{
SPerform(2071, (uint)km, 0);
}
public void ClearAllCmdKeys()
{
SPerform(2072, 0, 0);
}
Even this ClearAllCmdKeys does not work for me.
I do not know how to use the above or how to fix it?
Thanks,
Jay
--- Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> jay <[EMAIL PROTECTED]> wrote:
> > Thanks for the info. I have already handled
> CTRL+ENTER
> > as suggested. However, I have another issue due to
> key
> > handling.
> >
> > I have an MDIWindow that has many child scintilla
> > controls. When I handled CTRL+ENTER in scintilla,
> all
> > other hotkeys attached with MDIWindow does not
> work.
> >
> > It looks like Scintilla overrides all other
> hotkeys.
> > How can I enable CTRL+ENTER only to scintilla and
> > other keys work as usual for MDIWindow?
>
> It depends on what you are doing. If you are
> getting an event for
> literally every keypress coming into Scintilla, then
> what you can
> usually do (again, in my experience with other GUI
> toolkits) is to "skip"
> the event, that is, tell the event that you don't
> want to handle it here,
> but you want some other event handler to process and
> handle it.
>
> There should also be a way of using the
> AssignCmdKey() method to
> specifically add the CTRL+ENTER key combination to
> call a particular
> function or method. If this starts capturing
> everything...then
> something strange is going on.
>
> - Josiah
>
> > --- Josiah Carlson <[EMAIL PROTECTED]> wrote:
> >
> > >
> > > jay <[EMAIL PROTECTED]> wrote:
> > > > I am using .net wrapper of scintilla.
> > > > I wanted to handle the CTRL+ENTER key with a
> > > specal
> > > > function i have. How can I handle it?
> > > >
> > > > Similarly, I wanted to use F1, F2...F9 keys
> (not
> > > with
> > > > CTRL, but individually). How can I handle it
> with
> > > some
> > > > delegates or any other scintilla routines.
> > >
> > > Usually there is a mechanism to capture keyboard
> or
> > > character events
> > > sent to the window. I believe you should be
> able to
> > > use the same
> > > mechanism to capture keyboard/character events
> in
> > > your wrapped scintilla
> > > instance as you would in other .NET widgets.
> > >
> > > - Josiah
> > >
> > >
>
>
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest