Conversation
Add/remove the 4 main keyboard shortcuts to restore the standard behavior for FilterInput StringGadget when they gain/lose focus
|
No, there generic way is much better as all the tools are affected. We just need to add them when the form is activated and remove it when it loose focus |
|
I understand of course. And you're right not to give up on the generic way :) But I felt responsible and 6.40 is out now. I wanted to suggest a fix as soon as possible and Of course, you can close this PR |
Refactor using the generic way with #SCN_FOCUSIN, #SCN_FOCUSOUT, and add the shortcuts when Form Designer is active, and remove them when it loses focus
|
I reworked this PR to match what you wanted using the generic way and added the creation of shortcuts when Form Designer is activated and removed them when it loses focus. Rather than writing the code, to add or remove shortcuts multiple times, I added two new procedures, AddStringShortcuts() and DelStringShortcuts(), to ShortcutManagement.pb. ScintillaHighlighting.pb becomes: #SCN_FOCUSIN > AddStringShortcuts() and #SCN_FOCUSOUT > DelStringShortcuts() In addition, for the FormDesigner: Note: In Form Designer, design view, shortcuts are Not added/removed when switching tools (in the right-hand panel) between "Form" to "Procedures" or "Project". This is intentional, it is not essential here and it helps avoid bloating the source code. |
Add/remove the 4 main keyboard shortcuts (Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V) to restore the standard behavior for FilterInput StringGadget when they gain/lose focus
To replace the generic way, used previously, when the Scintilla component loses/gains focus
But with this generic way, these shortcuts (cut, copy, paste) no longer work in Form Designer, see: https://www.purebasic.fr/english/viewtopic.php?t=88746