Community
    • Login

    assign the same keyboard shortcut to multiple Macros

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    macrosshortcut
    13 Posts 4 Posters 287 Views
    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.
    • mathlete2M
      mathlete2 @Alan Kilborn
      last edited by

      @Alan-Kilborn yes, using the Ctrl+A shortcut prior to applying the modified Macro is the same as running the original Macro. This is easier than trying to remember a separate shortcut, so it’s probably the best alternative for the time being.

      However, just to confirm: there currently isn’t a way of configuring NP++ to disable a specific Macro as soon as something is selected? That’s effectively what I’m trying to do, so perhaps I should have phrased the question that way.

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @mathlete2
        last edited by

        @mathlete2 said in assign the same keyboard shortcut to multiple Macros:

        there currently isn’t a way of configuring NP++ to disable a specific Macro as soon as something is selected?

        Correct.
        Macros in Notepad++ are really simple. And simple-minded.
        If you want to open things up to scripting (programming), then you can do just about anything you want.

        1 Reply Last reply Reply Quote 3
        • mathlete2M
          mathlete2
          last edited by

          Macro-disabling functionality has been requested here.

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @mathlete2
            last edited by

            @mathlete2 said:

            Macro-disabling functionality has been requested here

            Prediction: This request will never be fulfilled.

            mathlete2M 1 Reply Last reply Reply Quote 0
            • mathlete2M
              mathlete2 @Alan Kilborn
              last edited by

              @Alan-Kilborn said in assign the same keyboard shortcut to multiple Macros:

              Prediction: This request will never be fulfilled.

              Prediction: this dire prediction will not deter me from making reasonable requests in the future…

              PeterJonesP mkupperM 2 Replies Last reply Reply Quote 0
              • PeterJonesP
                PeterJones @mathlete2
                last edited by PeterJones

                @mathlete2 ,

                I personally cannot see a situation in which your complicated “enable one disable the other via the menu” suggestion in the Feature Request would save any time or brain-space compared to having Ctrl+Key for one macro and Ctrl+Alt+Key for the other macro, and just remembering that “the one with Alt works on All text”. Personally, having to remember to go toggle both those macros in the menu to switch between them every time I wanted to change between All vs Selected would be more annoying to me than having two different keystrokes.

                And if you, personally, are willing to do that extra step, why not just pull up the Shortcut Mapper instead, and remove the shortcut on one and enable it on the other?

                Just my thoughts. (And, of course, you’re allowed to make any reasonable feature request you want; you just might want to be willing to consider alternatives, in case your FR is ignored or rejected.)

                mathlete2M 1 Reply Last reply Reply Quote 2
                • mkupperM
                  mkupper @mathlete2
                  last edited by

                  @mathlete2, Notepad++'s design philosophy has leaned towards being as lightweight as possible. It is a framework that allows for extensions, mainly in the form of plugins, some of which implement scripting languages that in turn led to plugins that allowed for scripts to access and change Notepad++ internals.

                  While Notepad++ has accumulated some bloat the developer has resisted going down the path of inventing and supporting a built in scripting language. Had that happened then it likely would have been easy to then map a keyboard shortcut to a built in script that had logic paths for the nature of the current selection, the contents, of the copy/paste buffer, etc.

                  mathlete2M 1 Reply Last reply Reply Quote 0
                  • mathlete2M
                    mathlete2 @PeterJones
                    last edited by mathlete2

                    @PeterJones it’s not so much about remembering alternative workflows, but accommodating personal preferences (which is exactly what Feature Requests are all about). This includes workflow efficiencies - a Ctrl+<key> shortcut is physically easier to execute than Ctrl+Alt+<key> or Ctrl+Shift+<key>, and the same can be said of the Ctrl+A+<key> alternative that @Alan-Kilborn mentioned. Sure, these are manageable workarounds, but it would be nice to have more advanced configuration options that allow you to make things even easier.

                    Also, many shortcuts are unwise to re-program, so there are a limited number of custom shortcuts for users to work with in the first place. If you have a lot of Macros, you can run out of options pretty quickly.

                    However, reading between the lines, I think you may have misunderstood what I’m trying to do (and/or why I can’t do it right now): I want to assign the same shortcut to two S/R Macros that are always simultaneously “enabled” (i.e. active in shortcuts.xml), but configure one to only be effective when the other isn’t.

                    ICYMI: this is all based on the concept of the “In selection” configuration; while useful in many contexts, it effectively renders an S/R Macro useless unless something is selected. If you can configure an S/R Macro to only be effective when something is selected, wouldn’t you also want to configure a similar Macro to only be effective when something isn’t selected? Right now, NP++ doesn’t offer a way to do that, so that’s effectively what I’ve requested.

                    1 Reply Last reply Reply Quote 1
                    • mathlete2M
                      mathlete2 @mkupper
                      last edited by

                      @mkupper fair enough. It’s definitely possible that I’m drastically underestimating the complexity of implementing this, but I’m hoping that there’s a reasonably simple way of doing so.

                      1 Reply Last reply Reply Quote 0
                      • mathlete2M
                        mathlete2
                        last edited by

                        @Alan-Kilborn @PeterJones @mkupper upon further reflection, I agree that my original RFE was unnecessarily complicated, so I’ve submitted another request targeted more towards my ultimate end goal.

                        PeterJonesP 1 Reply Last reply Reply Quote 0
                        • PeterJonesP
                          PeterJones @mathlete2
                          last edited by

                          @mathlete2 said in assign the same keyboard shortcut to multiple Macros:

                          I’ve submitted another request targeted more towards my ultimate end goal.

                          If your intent is to have the new one, not the old one, make sure you close the old one, so the developer knows which you actually want.

                          1 Reply Last reply Reply Quote 2
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors