Hey Thomas, QsciScintilla.standardCommands().clearKeys() That's it! Thanks for the suggestion! The above code clears all shortcuts and makes the QMainWindow shortcut work! Why does that work, but QSciScintilla.SendScintilla(QsciScintillaBase.SCI_CLEARALLCMDKEYS) does not?
Regards ________________________________ From: Thomas Lübking <[email protected]> Sent: Wednesday, December 8, 2021 3:05 PM To: Matic Kukovec <[email protected]> Cc: QScintilla <[email protected]> Subject: Re: Some shortcuts not propagating Am Wed, Dec 08, 2021 at 10:08:22AM +0000 schrieb Matic Kukovec: >(The QScintilla widget does NOT have that key shortcut bound to anything), the >QScintilla editor >just adds '/' characters. But when focusing with the mouse on any other >widget, the shortcut works! I'd be not so sure about that assertion: Ctrl+\ defaults to "Move right one word part" Ctrl++ to "Zoom in" And Ctrl+- to "Zoom out" Try eg. if (QsciCommand *cmd = doc->standardCommands()->boundTo(Qt::CTRL + Qt::Key_Plus)) cmd->setKey(0); // doc is QsciScintilla* to steal it. (I do that in sqriptor to override a bunch of shortcuts) That aside there's QAction::setShortcutContext(); Cheers, Thomas
