<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hey Thomas,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);" itemscope="" itemtype="https://schemas.microsoft.com/QuotedText">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<font size="2"><span style="font-size:11pt">QsciScintilla.standardCommands().clearKeys()</span></font><br>
</div>
</blockquote>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That's it! Thanks for the suggestion!<br>
The above code clears all shortcuts and makes the QMainWindow shortcut work!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Why does that work, but <i>QSciScintilla.SendScintilla(QsciScintillaBase.SCI_CLEARALLCMDKEYS)</i> does not?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Thomas Lübking <thomas.luebking@gmail.com><br>
<b>Sent:</b> Wednesday, December 8, 2021 3:05 PM<br>
<b>To:</b> Matic Kukovec <kukovecmatic@hotmail.com><br>
<b>Cc:</b> QScintilla <qscintilla@riverbankcomputing.com><br>
<b>Subject:</b> Re: Some shortcuts not propagating</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Am Wed, Dec 08, 2021 at 10:08:22AM +0000 schrieb Matic Kukovec:<br>
>(The QScintilla widget does NOT have that key shortcut bound to anything), the QScintilla editor<br>
>just adds '/' characters. But when focusing with the mouse on any other widget, the shortcut works!<br>
<br>
I'd be not so sure about that assertion:<br>
<br>
<br>
Ctrl+\ defaults to "Move right one word part"<br>
Ctrl++ to "Zoom in"<br>
And Ctrl+- to "Zoom out"<br>
<br>
Try eg.<br>
if (QsciCommand *cmd = doc->standardCommands()->boundTo(Qt::CTRL + Qt::Key_Plus))<br>
cmd->setKey(0); // doc is QsciScintilla*<br>
to steal it.<br>
<br>
(I do that in sqriptor to override a bunch of shortcuts)<br>
<br>
That aside there's QAction::setShortcutContext();<br>
<br>
<br>
Cheers,<br>
Thomas<br>
</div>
</span></font></div>
</body>
</html>