[QScintilla] Missing key events

Andrei Kopats hlamer at tut.by
Fri Feb 10 12:20:54 GMT 2012


Hi

Bug is still reproduced for me in QScintilla-gpl-snapshot-2.6.1-e8ccaf398640

Andrei Kopats
http://hlamer.github.com/mksv3/ - Simple programmers text editor

2012/1/27 Phil Thompson <phil at riverbankcomputing.com>

> On Thu, 26 Jan 2012 20:41:13 +0300, Andrei Kopats <hlamer at tut.by> wrote:
> > Hi
> >
> > I have a problem with the latest QScintilla snapshot.
> >
> > My editor clears all Scintilla internal key mappings and processes all
> key
> > pressings with QActions. But, on the latest version of QScintilla, my
> > QActions don't receive some key pressings.
> >
> > To make a test for this bug, I modified example-Qt4 from the latest
> > QScintilla snapshot. See the code below. I expect that after this
> > modifications, standard key mappings does not work. So, we can't move
> > cursor or select a text. We can only type symbols. It is correct.
> > But, if we selected some text with mouse, we should be able to
> copy-paste
> > it with Ctrl+C and Ctrl+V, because there are QActions in the Edit menu.
> > But, for me, this actions does not work.
> >
> > I can't say exactly, when this problem appeared. QScintilla version from
> > Ubuntu 11.10 works correctly, but version in Debian wheezy and
> > snapshot QScintilla-gpl-snapshot-2.6.1-131138b43c85 is affected.
> >
> > Is it a bug, or, am I doing something incorrectly?
> >
> > Thanks in advance,
> > Andrei Kopats
> > http://hlamer.github.com/mksv3/ - Simple programmers text editor
> >
> >
> > ...
> > MainWindow::MainWindow()
> > {
> >     textEdit = new QsciScintilla;
> >
> >     // Clear all commands
> >     textEdit->SendScintilla( QsciScintillaBase::SCI_CLEARALLCMDKEYS );
> >     // Ctrl+Key pressings insert some strange symbols. Clear all
> mappings.
> >     for (char key = 'A'; key <= 'Z'; key++)
> >         textEdit->SendScintilla(QsciScintillaBase::SCI_CLEARCMDKEY, key
> +
> > (QsciScintillaBase::SCMOD_CTRL << 16));
> >     // Now I expect, that Ctrl+V, Ctrl+C, Ctrl+X will be processed by
> the
> > actions, created at MainWindow::createActions()
> >     // but, this key pressings are ignored
> >
> >     setCentralWidget(textEdit);
> > ...
>
> It is a bug (fixed in tonight's snapshot) and you are doing something
> incorrectly.
>
> To clear the existing bindings do...
>
>    textEdit->standardCommands()->clearKeys()
>    textEdit->standardCommands()->clearAlternateKeys()
>
> Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20120210/f7bd100b/attachment.html>


More information about the QScintilla mailing list