Menu

Request for scintilla accelerator keymap

loonychewy
2008-07-19
2012-11-14
  • loonychewy

    loonychewy - 2008-07-19

    For MultiClipboard version 2 development, I want the plugin to be notified when a "paste" command is sent to the edit window. However, for "paste" command that is sent via the scintilla accelerator key (default Ctrl-V & Shift-Insert), it is not possible for the plugin to intercept this.

    This is because when the scintilla control receives WM_KEYDOWN, it looks up its internal KeyMap class, and directly call its own windows procedure with the mapped message (i.e. SCI_PASTE). The problem lies with it calling its own window procedure directly and not via ::SendMessage(), which means that even if I sub-class scintilla window, I'll still not be able to get SCI_PASTE.

    The only solutions I can think of are:
    1) Hardcode MultiClipboard to handle Ctrl-V/Shift-Insert --> Which means if the user changes the accelerator key, this feature of the plugin won't work.

    2) API-Hooking to scintilla's windows procedure --> This will only work with specific version of scintilla, otherwise, I'll risk application crash.

    3) For Notepad++ developers to modify scintilla so that these messages can be forwarded to the plugins --> Major pain for the developers especially when upgrading to a new version of scintilla, being an external library to Notepad++.

    4) Expose the scintilla key mappings contained in NppParameters::_scintillaKeyCommands in some form readable by the plugins --> Most logical way I can think of.

    Can the Notepad++ developers kindly please consider this issue, and if there are any alternative methods, I'll most gladly take it.

    I hope to bring some new and useful features in MultiClipboard version 2 to all Notepad++ users (not just bug fixes), and the resolving of this problem will be of much help to this endeavour.

    Regards,
    LoonyChewy.

     
    • loonychewy

      loonychewy - 2008-08-08

      *Bump* Sorry to be bugging, but any thoughts on this? :-)