The Shortcut Mapper

2013-10-18
2013-11-10
  • David Bailey

    David Bailey - 2013-10-18

    I think I raised this before, without getting a very useful answer.

    I would love to be able to extract the information contained in the Shortcut mapper in a form that could be manipulated - because I would like to order the information by hot-keys rather than by actions and general topic. In that way it would be easy to discover which hot-key is masking some desired action.

    I'd be quite happy to access an API to get this information into a plugin, or a way to copy all the mapping information to a file.

    David

     
  • Davey

    Davey - 2013-10-20

    This is something which I have been wanting for a long time already.
    I would love for this to be considered and updated.
    If we are taking a vote - You have mine!

    Davey

     
  • David Bailey

    David Bailey - 2013-10-22

    Bump!

    Why is this information so hard to get at!

    David

     
  • Andreas Jonsson

    Andreas Jonsson - 2013-10-22

    What kind of API did you have in mind? For a plugin? I once considered rewriting the shortcut mapper, but thought that it was too much work. An API which returns a copy of the entire shortcut structure, plus another API which allows a plugin to change shortcuts, could probably be done < 50 lines of code...

     
  • David Bailey

    David Bailey - 2013-10-23

    Andreas,

    Are you talking about something that can be done in a plugin, or something that requires changes to the source? Obviously anything is possible if you hack the source, but I would like a way to access the data to create a plugin command!

    David

     
  • Andreas Jonsson

    Andreas Jonsson - 2013-10-23

    It can't be in a plugin right now (as far as I know), so it seems like a natural step to add an API so plugins can get/change shortcuts.

     
  • Iñaki

    Iñaki - 2013-10-24

    Hi,
    Keyborad mappings used to be saved to a file named shortcuts.xml, which you can parse to get that info. However, I recently installed a fresh Notepad++ 6.5 version and my mappings seem not to be read nor saved to such file anymore. Would such file be enough for the plugin you have in mind?

     
  • Andreas Jonsson

    Andreas Jonsson - 2013-10-24

    shortcuts.xml is still used to save the mappings (it's in AppData\Roaming\Notepad++). The problem is that it doesn't show all shortcuts, only those the user has changed.

     
  • David Bailey

    David Bailey - 2013-10-24

    If you install a plugin, does that count as a change? If it does, I suppose one could start from a list of shortcuts typed in manually, and overwrite them with the changes. At least that way, you could identify what was interfering with what - even if you had to use the Shortcut mapper to fix it. A plugin could also move its own shortcuts to ensure they were visible.

    David

     
  • THEVENOT Guy

    THEVENOT Guy - 2013-10-26

    Hi, David, Davey, Andreas, Iñaki, and All,

    As for me, I solved the problem of a complete list of shortcuts, in my N++ configuration, by creating an Excel file, which contains 10 columns :

    • The name of the plugin or the concerned group ( Scintilla, Main menu, Macros, Reserved ...)
    • The ordering number of the command or function in its group
    • The name/description of the command or function
    • The use or not of the Alt Gr key, in the shortcut ( possible in Scintilla group )
    • The use or not of the Alt key, in the shortcut
    • The use or not of the Ctrl key, in the shortcut
    • The use or not of the Shift key, in the shortcut
    • The Notepad++'s name of the main key pressed, as indicated in the Shortcut Mapper
    • The exact representation of the main pressed key, on my French keyboard
    • The state of the shortcut ( Old, New, Suppressed or Nothing )

    Notes :

    The group Reserved contains all reserved Windows shortcuts, NOT to be used by user, as Ctrl + Alt + Suppr, Alt + Tab, Shift + F10,...., and of course, the only hit on an alphabetic or number key, for example !

    The suppressed state of a shortcut concerns a default plugin, part of the original version, that the user don't use any more

    If a command/function is described on ONE line, of this Excel file, that means that THIS default shortcut of N++ has not been changed, yet.

    If a command/function is described on TWO lines, that means that, for this specific command/function, :

    • The old default shortcut has been changed
    • The old default shortcut has been deleted
    • A new user shortcut has been created

    Remark :

    • The FIRST line indicates the OLD default shortcut or the lack of shortcut, for that specific command
    • The SECOND line indicates the NEW shortcut or the suppression of the default shortcut, for that specific command

    Then, while using the option Automatic filter of Excel, it's very easy, for example, to see all the shortcuts which use the alphabetic key Y, OR all the shortcuts which use, both, the ALT et CTRL keys and their corresponding commands, or even to look for a specific combination, for example, Alt + Shift + F7, and verify the possibility of 2 or more commands/functions, attached to this Alt + Shift + F7 shortcut !

    You can also sort this Excel list of shortcuts, in many ways !

    This Excel file was realized with the last 5.9.8 ANSI version of N++ and contains 1070 lines about which corresponds to a set of 730 commands / functions, relative to N++, to the 35 created macros and to the 36 installed plugins on this ANSI configuration.

    I haven't updated this Excel file, on my current 6.5 UNICODE version of N++ yet, because I'm always, in test phase, with up to 63 unicode plugins, installed on this configuration !!!

    Of course, such a file is quite difficult to create, at beginning, but, afterwards, it doesn't really change, except when you add or delete a plugin / macro or when new options are added in a new version of N++ :-)

    However, I agree with you, that the actual form of the shortcut Mapper could be improved !


    BTW, as the number of possible plugins is quite important, on the UNICODE configuration of N++, could it be possible to use the Windows key in shortcuts? With that possibility, we would have plenty of new shortcuts, which wouldn't interfere with existent ones !

    Of course, Microsoft OS ( Windows XP, W7 and W8 ) already use few Windows key shortcuts, like Windows + E, Windows + R ,..., which, certainly, would have priority to our N++ shortcuts !

    What do you think of my suggestion ?

    Cheers,

    guy038

     
    Last edit: THEVENOT Guy 2013-10-27
  • cchris

    cchris - 2013-11-10

    There is some discussion about it in the Plugin Development forum.

    CChris

     

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks