On 17 Oct 2015, at 10:11 a.m., Yuya Nishihara <[email protected]> wrote: > > Hello, > > I got a bug report that says numpad Del key triggers a shortcut event. > > https://bitbucket.org/tortoisehg/thg/issues/4317/ > > Perhaps QsciScintilla::event() have to exclude Qt::KeypadModifier or select > only valid modifiers. > > Untested patch: > > --- Qt4Qt5/qsciscintilla.cpp.orig 2015-10-17 18:04:26.507849796 +0900 > +++ Qt4Qt5/qsciscintilla.cpp 2015-10-17 18:06:55.332284177 +0900 > @@ -4231,7 +4231,7 @@ > } > > // We want any key that is bound. > - QsciCommand *cmd = stdCmds->boundTo(ke->key() | ke->modifiers()); > + QsciCommand *cmd = stdCmds->boundTo(ke->key() | (ke->modifiers() > & ~Qt::KeypadModifier)); > > if (cmd) > { > > Step to reproduce: > > 1. run the following code > 2. type something > 3. press 'Del' -> works > 4. press numpad 'Del' -> nothing happen > > from PyQt4.QtGui import QApplication, QShortcut > from PyQt4.Qsci import QsciScintilla > > app = QApplication([]) > sci = QsciScintilla() > QShortcut('Delete', sci) > sci.show() > app.exec_()
Can you try the current snapshot? Thanks, Phil _______________________________________________ QScintilla mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/qscintilla
