<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[assign the same keyboard shortcut to multiple Macros]]></title><description><![CDATA[<p dir="auto">I recently <a href="https://community.notepad-plus-plus.org/post/99204">posted some Macro code</a> for a useful regex-based <strong>Find/Replace All</strong> process.</p>
<p dir="auto">As noted in the <a href="https://npp-user-manual.org/docs/searching/#searching-actions-when-recorded-as-macros" rel="nofollow ugc">Actions documentation</a>, if I change the <strong>1702</strong> message from <s><strong>786</strong></s> to <strong>128</strong>, the Macro only applies to whatever text I happen to select.  This can be useful in some situations, so what I’d like to do is have <strong>both</strong> variations of the Macro exist <strong>for the same keyboard shortcut</strong> (i.e. apply the <em>original</em> Macro when <em>nothing</em> is selected, but apply the <em>modified</em> Macro when <em>something</em> is selected).</p>
<p dir="auto">When I have the <em>modified</em> Macro code listed <strong>above</strong> the <em>original</em> Macro code, only the <em>modified</em> Macro is functional.  When I switch the order, the original Macro is the only one that’s functional; it applies to all text in the file, even if only a portion of it is selected.  I’m guessing this happens because the <strong>1702</strong> message is still <strong>786</strong>, but I can’t figure out what I would need to change this to in order to achieve the desired configuration.</p>
<p dir="auto">Does NP++ support contextual Macros like this?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26559/assign-the-same-keyboard-shortcut-to-multiple-macros</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 12:46:40 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26559.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Jan 2025 15:43:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Fri, 31 Jan 2025 19:54:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19707">@mathlete2</a> said in <a href="/post/99525">assign the same keyboard shortcut to multiple Macros</a>:</p>
<blockquote>
<p dir="auto">I’ve submitted another request  targeted more towards my ultimate end goal.</p>
</blockquote>
<p dir="auto">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.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99527</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99527</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 31 Jan 2025 19:54:23 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Fri, 31 Jan 2025 18:57:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/5329">@mkupper</a> upon further reflection, I agree that my original RFE was unnecessarily complicated, so I’ve submitted <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16132" rel="nofollow ugc">another request</a> targeted more towards my ultimate end goal.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99525</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99525</guid><dc:creator><![CDATA[mathlete2]]></dc:creator><pubDate>Fri, 31 Jan 2025 18:57:02 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Thu, 30 Jan 2025 19:59:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/5329">@mkupper</a> 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.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99491</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99491</guid><dc:creator><![CDATA[mathlete2]]></dc:creator><pubDate>Thu, 30 Jan 2025 19:59:24 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Thu, 30 Jan 2025 19:50:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> 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 <code>Ctrl</code>+<code>&lt;key&gt;</code> shortcut is physically easier to execute than <code>Ctrl</code>+<code>Alt</code>+<code>&lt;key&gt;</code> or <code>Ctrl</code>+<code>Shift</code>+<code>&lt;key&gt;</code>, and the same can be said of the <code>Ctrl</code>+<code>A</code>+<code>&lt;key&gt;</code> alternative that <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> mentioned.  Sure, these are <em>manageable</em> workarounds, but it would be nice to have more advanced configuration options that allow you to make things even easier.</p>
<p dir="auto">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.</p>
<p dir="auto">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 <strong>same</strong> shortcut to two S/R Macros that are <em>always</em> simultaneously “enabled” (i.e. active in <code>shortcuts.xml</code>), but configure one to <strong>only be effective when the other isn’t</strong>.</p>
<p dir="auto">ICYMI: this is all based on the concept of the “In selection” configuration; while useful in many contexts, it <strong>effectively renders an S/R Macro useless unless something is selected</strong>.  If you can configure an S/R Macro to <em>only</em> be effective when something <strong>is</strong> selected, wouldn’t you also want to configure a similar Macro to only be effective when something <strong>isn’t</strong> selected?  Right now, NP++ doesn’t offer a way to do that, so that’s effectively what I’ve requested.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99490</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99490</guid><dc:creator><![CDATA[mathlete2]]></dc:creator><pubDate>Thu, 30 Jan 2025 19:50:16 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Thu, 30 Jan 2025 19:00:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19707">@mathlete2</a>, 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.</p>
<p dir="auto">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.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99487</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99487</guid><dc:creator><![CDATA[mkupper]]></dc:creator><pubDate>Thu, 30 Jan 2025 19:00:42 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Thu, 30 Jan 2025 18:24:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19707">@mathlete2</a> ,</p>
<p dir="auto">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 <code>Ctrl+Key</code> for one macro and <code>Ctrl+Alt+Key</code> for the other macro, and just remembering that “the one with <code>Alt</code> works on <code>All</code> 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 <em>more</em> annoying to me than having two different keystrokes.</p>
<p dir="auto">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?</p>
<p dir="auto">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.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99485</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99485</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 30 Jan 2025 18:24:58 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Thu, 30 Jan 2025 18:15:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> said in <a href="/post/99481">assign the same keyboard shortcut to multiple Macros</a>:</p>
<blockquote>
<p dir="auto">Prediction: This request will never be fulfilled.</p>
</blockquote>
<p dir="auto">Prediction: this dire prediction will not deter me from making reasonable requests in the future…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99483</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99483</guid><dc:creator><![CDATA[mathlete2]]></dc:creator><pubDate>Thu, 30 Jan 2025 18:15:19 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Thu, 30 Jan 2025 18:05:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19707">@mathlete2</a> said:</p>
<blockquote>
<p dir="auto">Macro-disabling functionality has been requested here</p>
</blockquote>
<p dir="auto">Prediction: This request will never be fulfilled.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99481</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99481</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 30 Jan 2025 18:05:55 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Thu, 30 Jan 2025 17:22:45 GMT]]></title><description><![CDATA[<p dir="auto">Macro-disabling functionality has been <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16124" rel="nofollow ugc">requested here</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99477</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99477</guid><dc:creator><![CDATA[mathlete2]]></dc:creator><pubDate>Thu, 30 Jan 2025 17:22:45 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Fri, 17 Jan 2025 17:14:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19707">@mathlete2</a> said in <a href="/post/99215">assign the same keyboard shortcut to multiple Macros</a>:</p>
<blockquote>
<p dir="auto">there currently isn’t a way of configuring NP++ to disable a specific Macro as soon as something is selected?</p>
</blockquote>
<p dir="auto">Correct.<br />
Macros in Notepad++ are really simple.  And simple-minded.<br />
If you want to open things up to scripting (programming), then you can do just about anything you want.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99216</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99216</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 17 Jan 2025 17:14:56 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Fri, 17 Jan 2025 17:11:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@Alan-Kilborn</a> yes, using the <code>Ctrl</code>+<code>A</code> 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.</p>
<p dir="auto">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.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99215</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99215</guid><dc:creator><![CDATA[mathlete2]]></dc:creator><pubDate>Fri, 17 Jan 2025 17:11:30 GMT</pubDate></item><item><title><![CDATA[Reply to assign the same keyboard shortcut to multiple Macros on Fri, 17 Jan 2025 15:51:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/19707">@mathlete2</a> said in <a href="/post/99212">assign the same keyboard shortcut to multiple Macros</a>:</p>
<blockquote>
<p dir="auto">for the same keyboard shortcut (i.e. apply the original Macro when nothing is selected, but apply the modified Macro when something is selected).</p>
</blockquote>
<p dir="auto">Not possible this way.<br />
Make the macro use <em>In selection</em> (hopefully your search action is something that supports that option), and then to affect all text, do a Ctrl+a before running the macro.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/99213</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99213</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 17 Jan 2025 15:51:12 GMT</pubDate></item></channel></rss>