I am used to Ctrl+Insert as my shortcut for "Copy to clipboard". Also Shift+Insert for "Paste" and Ctrl+Delete for "Cut".
Recently, these shortcuts stopped working in Notepad++. I don't remember if I updated it to latest version. When I go to Notepad++ menu "Settings" -> "Shortcut Mapper", I see that Ctrl+C is mapped to the "Copy" command. This is good, but I also want Ctrl+Insert to do the same. When I try to change the mapping, it deletes the Ctrl+C mapping.
How can I map two shortcuts to the same command? Is it only possible for a few commands (like Copy, Paste and Cut) and not generally?
-
Do you know AutoHotKey? autohotkey.com/docs/v2/howto/WriteHotkeys.htmuser1482432– user14824322024年01月14日 13:09:14 +00:00Commented Jan 14, 2024 at 13:09
-
Interesting stuff, I had no idea it existed! If I don't get an answer to this question, maybe I can use AutoHotKey as a workaround.anatolyg– anatolyg2024年01月14日 14:02:34 +00:00Commented Jan 14, 2024 at 14:02
2 Answers 2
This is impossible in N++ currently and is a requested feature that you can support.
There is a working workaround listed though:
It is a pretty reasonable request. I can think of a workaround as you wait for it to be accepted and implemented though: Record and name two macros ("Close1" and "Close2"), each with a single action ("Close") and then assign each macro to a different keycombo (e.g. "Close1" to Ctrl + F4, "Close2" to Ctrl + W).
The same can be done here with anologically. Recording can be done through Macro -> Start Recording.
As for AutoHotkey workaround, it should be as simple as:
#IfWinActive ahk_class Notepad++
^Ins::Send, ^c
+Ins::Send, ^v
^Del::Send, ^x
Check documentation for info about key names and mapping.
The problem with Copy/Paste shortcuts is a regression which happened in version 8.6.1 and was fixed in version 8.6.2.
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14551
Notepad++ has a hard-coded table of keyboard shortcuts. Some commands (Cut, Copy, Paste and a few others) have two hard-coded shortcuts. The user can change any or both of them using Shortcut mapper. Adding a second shortcut for any other command seems impossible.