Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Disable menu activation for a shortcut.

    Help wanted · · · – – – · · ·
    3
    5
    3201
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Steve King
      Steve King last edited by

      Hello Notepad++ folks,

      How do I unmap or otherwise prevent a shortcut from activating a menu?

      For example, I mapped Alt-L to delete line. My shortcut works (line is deleted), but also activates the “Language” menu, which I do not want.

      Thanks in advance for the help.

      1 Reply Last reply Reply Quote 0
      • guy038
        guy038 last edited by guy038

        Hello, @steve-king,

        Ah, yes, the Alt + Letter shortcuts are, usually, associated with the some choices of the menu bar !

        To change these default shortcuts :

        • Close any instance of Notepad++

        • Localize the english_customizable.xml file, in the localization folder, under :

          • The installation folder of Notepad++.exe, for a local installation, with the zero-length file doLocalConf.xml

          • The folder %AppData%\Roaming\Notepad++, in case of installation, with the installer, on a W7, W8 or W10 machine

          • The folder %AppData%\Notepad++, in case of installation, with the installer, on a Win XP or Vista machine

        • At beginning of that file, in the <Entries> section, change the line :

        <Item menuId="language" name="&amp;Language"/>
        

        by, for instance, this one :

        <Item menuId="language" name="Lan&amp;guage"/>
        
        • Save the changes of english_customizable.xml file

        • Re-start Notepad++

        • Choice the option Settings > Preferences... > General > Localization

        • Select the language English (customizable)

        • Click on the Close button

        => From now on, you’ll have to hit the shortcut Alt + G, to select the Language menu ! … and no more conflict with your Alt + L shortcut :-D

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 2
        • Scott Sumner
          Scott Sumner last edited by Scott Sumner

          @guy038 ,

          Very nice–I didn’t know these type of key combinations could be reassigned, or even REMOVED entirely (just delete the “&” part completely instead of moving it to another selection of the menu word). But it makes sense as you could change the File menu text to say “Panda” (or whatever) if you wanted, and there is no “F” in that!

          One thing I did try was to NOT close and restart Notepad++…and it works just fine this way. Even though I already had “English (customizable)” selected in the dropdown in the Preferences, all I had to do was drop down the menu like I was going to change AWAY from “English (customizable)”, but then actually just reselect it. After that any changes made to the english_customizable.xml file take effect.

          Scott Sumner 1 Reply Last reply Reply Quote 1
          • Scott Sumner
            Scott Sumner @Scott Sumner last edited by Scott Sumner

            @Scott-Sumner

            Oops. It appears that if you remove &amp; entirely from the text of a menu item, the original Alt-based keycombo will still work (Alt+F in the case of File, Alt+L in the case of Language, etc), even though there will be no underline of that letter when the “File Edit Search…” menu is activated by pressing and releasing Alt alone. :(

            In the earlier post, where I said & it should have been &amp; I didn’t check the markdown. :(

            1 Reply Last reply Reply Quote 1
            • Steve King
              Steve King last edited by

              I also removed the &amp; completely, and trying to diagnose why I still saw default behavior was driving me crazy. I ended up just adding &amp;_ to the end of each menu item.

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors