Automate shortcut configuration



  • Hello,

    I’m trying to automate the installation of Notepad++ and therfore I need to know where it stores the shortcut values so I can configure them (by editing some file, not using the interface!). So my question is: where can I find the file that stores all shortcuts?
    I added some new shortcuts using the interface (Settings --> Shortcut Mapper) but nothing has changed in shortcut.xml.

    Thanks for your help!



  • They are stored in shortcut.xml but the file is written during notepad++ closing.
    The file is read during notepad++ opening. So be sure that notepad++ is closed when you edit this file



  • @cmeriaux
    Thanks for your answer. It doesn’t seem to work for me. I closed and reopened Notepad++ and could see the new shortcut I added in the settings menu but not in shortcut.xml
    If that is working on your computer, could you please give me the “Reload from disk” command?



  • Please, show me your debug info and, the parameter “Local Conf Mode”

    Notepad++ v7.8.2   (32-bit)
    Build time : Jan  6 2020 - 20:31:59
    Path : C:\Program Files (x86)\Notepad++\Notepad++.exe
    Admin mode : ON
    Local Conf mode : OFF
    OS Name : Windows 7 Professional (64-bit) 
    OS Build : 7601.0
    Plugins : AutoEolFormat.dll CodeAlignmentNpp.dll ComparePlugin.dll ExtSettings.dll FileSwitcher.dll HexEditor.dll LightExplorer.dll mimeTools.dll NavigateTo.dll NppConverter.dll NppExport.dll NppFavorites.dll NppFTP.dll NppGTags.dll NPPJSONViewer.dll NppJumpList.dll NppMenuSearch.dll nppplugin_svn.dll NppTextFX.dll PythonScript.dll SourceCookifier.dll WindowManager.dll
    

    My shortcut.xml is located in my romaing folder:

    C:\Users\john.doe\AppData\Roaming\Notepad++\shortcuts.xml
    


  • @cmeriaux
    Excuse my limited knowledge but where can I find the debug info? I looked for it but could not figure it out!



  • Menu “?” then menu “debug info”

    You may have an outdated notepad++ version

    My shortcut.xml is located in my romaing folder:

    C:\Users\john.doe\AppData\Roaming\Notepad++\shortcuts.xml
    


  • @cmeriaux

    Notepad++ v7.8.2   (32-bit)
    Build time : Dec  4 2019 - 01:36:59
    Path : D:\tools\Notepad++\notepad++.exe
    Admin mode : ON
    Local Conf mode : OFF
    OS Name : Windows Server 2016 Standard (64-bit) 
    OS Version : 1607
    OS Build : 14393.2551
    Plugins : mimeTools.dll NppConverter.dll NppExport.dll
    


  • @Adnan-Haddad said in Automate shortcut configuration:

    Local Conf mode : OFF

    so you should look in you app data roming folder :

    C:\Users\john.doe\AppData\Roaming\Notepad++\shortcuts.xml
    


  • @cmeriaux
    Yes I see it but it doesn’t contain the command I’ve set through the interface.
    This is the command I want to automate:
    1.png
    And this is how my shortcut.xml looks like:
    2.png



  • @Adnan-Haddad

    install procmon, set a filter for shortcuts.xml and run it.
    Start npp and see where it is loading the file from.
    Make your changes and close npp.
    Check if procmon informs about any error or whether npp
    was able to save it correctly.


Log in to reply