Still the same: ShortCut Mapper / ShortCut Manager

SirTom
2013-11-07
2015-03-22
  • SirTom

    SirTom - 2013-11-07

    I'ld like, (and take the effort) to make a ShortCut Manager.
    But I can't even find all the shortcuts.
    Shortcuts.xml contains only a (verry) small part of the keys.

    Where are the other shortcuts, eg. for plugins (like TextFX) ?
    How can i find the complete list of functions which can bei shortcut'ed?

     
    • orange2529

      orange2529 - 2015-03-22

      I can't find it,either.

       
      Last edit: orange2529 2015-03-22
  • CorruptedFile

    CorruptedFile - 2013-11-07

    Notepad++ already has this as a built-in feature. Have a look in Settings>Shortcut Mapper...

     
    • SirTom

      SirTom - 2013-11-08

      I know this one, but it doesn't
      - help to find collisions.
      - sort by name or by short-cut or by plugin name
      - enable me to print (not even copy/paste) a keyboard layout
      - organise by ranking
      - commenting strange entries or commenting out entries I'l never use
      - ...

      It is VERRRRY rudimentary! (I know it is in wish list for years)

       
  • cchris

    cchris - 2013-11-08

    The shortcuts are not held in a single file indeed:
    shortcuts.xml contains explicit shortcuts for all macros and user commands
    It also contains the difference between standard and actual bindings, for both N++ and Scintila commands.
    There is no file for plugin commands: the initialisation of each plugin dll defines the shortcuts and makes available for N++ to list them.

    This results in the shortcut mapper listening to plugin loading, confi file loading, asking Scintilla for its standard key bindings and relying to a hardcoded list of N++ shortcuts. Any replacement for it will need to do the same, soit can hardly be a plugin (unlesss it spies on the dynamically built dialog for the built-in shortcut mapper...).

    And you have more and more Python scripts whose shortcuts appear to be global and are listed nowhere but in the script proper (I stand to be corrected here as I don't use Python much myself).

    CChris

     
  • SirTom

    SirTom - 2013-11-08

    Where can I find "initialisation of each plugin dll"?
    As I can change "hardcoded list of N++ shortcuts" there must be an entry/ini/cfg.
    Where can I find these?

    I cant find any in %program% nor in %appdata% or %roaming% ?!

     
  • cchris

    cchris - 2013-11-08

    Indeed you won't.
    When Notepad++ loads plugins (and it can happen after notepad++.exe has started), the plugin hands a list of menu entries with suggested, optional shortcut to the loader, which in turn informs the mapper. This is strong coupling with all its problems. You cannot find it anywhere since it happens at run time. See the NpWiki++ page on plugin development for details.
    The hardcoded shortcut list is hardcoded, so it is written in the source code of N++. You'd need to modify and recompile it to introduce a change there.

    So I see three ways only:
    1/ rework the code in such a way that it somehow exports the key bindings at run time (probably by sending it an appropriate message), and then develop a plugin which will present the bindings in more usable ways
    2/ Subclass the shortcut mapper window so that, when it pops up, you can extract all the information therein and present it in more usable ways. The problem there is detecting reliably when it pops up without the performance penalty of polling.
    3/ Rewrite the shortcut mapper in such a way that it provides more useful features.

    And then, for option 1 and 3/, massage Don into accepting the necessarily heavyweight patch...

    CChris

     
  • SirTom

    SirTom - 2013-11-08

    Ok, I see. No Chance! :-(

    I understand and knew the concept of plugins, at runtime, but still remains 1 question:
    Even if (eg.) TextFX comunicates the shortkeys at runtime - I CAN assigne a shortcut permanently! If I change it, NPP "knows" at next start the new assignment. So this means: there MUST be stored this information somewhere. (Be it xml or binary or ...)

    If I knew the location (and structure) of this information (may be für each plugin/DLL different), I might have a chance to extract at least the shortcuts for checking duplicates/collisions and printing it.

    I'm really curios where it is stored.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks