• Login
Community
  • Login

How do I use ctrl+backspace shortcut to delete word's worth in Notepad++ because it won't let me

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 3 Posters 1.1k 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.
  • C
    Coga Fireese
    last edited by Dec 18, 2020, 10:15 AM

    I wanted to use shift+backspace to use to erase a word’s worth like on how a normal computer I would type, but notepad++ wouldn’t allow me to unless I’d add ctrl or alt to it

    It’s because of consistency’s sake that I wanted it to add on to this, and some of the keys could work it’s just that a few exceptions they won’t let me allow to use the shortcut I wanted like this shift+backspace here.

    I would love to help me on this if you want to suggest me on anything or to find a plugin to make something like this possible to work

    v.png

    P 1 Reply Last reply Dec 18, 2020, 2:21 PM Reply Quote 1
    • C
      carypt
      last edited by carypt Dec 18, 2020, 12:21 PM Dec 18, 2020, 12:20 PM

      i have no idea , but i see shift + backspace is already in use . did you try to clear those dependencies first ?

      1 Reply Last reply Reply Quote 0
      • C
        Coga Fireese
        last edited by Dec 18, 2020, 12:49 PM

        no conflicts, I’ve deleted them all and the default for shift backspace is supposedly just the backspace button, it’s just another shortcut added in Notepad++

        P 1 Reply Last reply Dec 18, 2020, 2:44 PM Reply Quote 0
        • P
          PeterJones @Coga Fireese
          last edited by Dec 18, 2020, 2:21 PM

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • P
            PeterJones @Coga Fireese
            last edited by Dec 18, 2020, 2:44 PM

            @Coga-Fireese ,

            Interesting. I can confirm that other keystrokes will allow me to Add and/or Apply, but it won’t let me do Shift+Backspace.

            I even went to SCI_DELETEBACK, which by default (verified with fresh portable edition unzip) has Shift+Backspace as the alternate keystroke:
            c8df2d76-8b4d-425a-b64d-e1a2ac3733fe-image.png

            57bc51df-fb28-4048-8173-9d54ef4ccc80-image.png

            If I Remove the Shift+Backspace entry, it now doesn’t allow me to Add and/or Apply
            26ed7bd9-83da-43c6-b1ba-4878ce9aae6c-image.png

            whereas if I try a different keystroke (like Alt+Shift+Backspace), those entries are enabled:
            9c0bc668-0317-430e-9251-700347642236-image.png

            If I cancel out of there (I don’t want to lose Shift+Backspace for now) and go to a different Scintilla command (SCI_DELETEBACKNOTLINE) – if I try to pick Shift+Backspace
            9681d518-f2b1-4d7d-9efb-7b3034458cd6-image.png

            … it tells me there’s a conflict and won’t let me Add/Apply. If I try just backspace, it also tells me there’s a conflict and won’t let me Add/Apply.

            But if I try a different key (like TAB), it tells me there is a conflict, but it will let me Add/Apply:
            d4e64d74-8cbd-410b-9ff0-0a733b8d85a3-image.png

            So, the shortcut mapper treats Backspace and Shift+Backspace different from other keys. It may be the the OS doesn’t allow (or doesn’t always honor) mapping those two to anything other than backspace functionality. I cannot think of an editor application where Shift+Backspace has a different meaning from Backspace, but I also cannot ever remember trying that key combo before.

            I just tried the experiment where I unmapped Shift+Backspace and tried typing it: it inserts the BS character (with its black-box set-representation). So it can do something different than just backspace over the previous character. But maybe there’s something about the underlying Scintilla component that won’t let Shift+Backspace do anything but do a normal backspace or type the BS character

            However, by following the procedure to edit a config file , I was able to edit shortcuts.xml, and change the shortcut on the default Run > Open file in another instance action to make use of that keystroke:

                <Command name="Open file in another instance" Ctrl="no" Alt="no" Shift="yes" Key="8">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command>
            

            When I reload Notepad++, that action is now associated with Shift+Backspace: 69493944-9a50-49c5-9488-4ce55c8d2efd-image.png

            Similarly, if I set a command like SCI_DELETEBACKNOTLINE to a dummy shortcut *, like Shift+Alt+Backspace, exit, then edit shortcuts.xml so the scintilla keys look like:

            <ScintillaKeys>
                <ScintKey ScintID="2326" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="8" />        <!-- remove the shift+backspace from SCI_DELETEBACK -->
                <ScintKey ScintID="2344" menuCmdID="0" Ctrl="no" Alt="no" Shift="yes" Key="8" />       <!-- set SCI_DELETEBACKNOTLINE to shift+backspace manually -->
            </ScintillaKeys>
            

            when I reload Notepad++, that change has taken effect, and Shift+Backspace is now mapped from SCI_DELTEBACKNOTLINE:
            0c87ab16-b5ea-4251-a3d2-30b42048c439-image.png

            So, while the Shortcut Mapper GUI won’t let you assign the Shift+Backspace (or just Backspace) key, if you edit shortcuts.xml, you can re-map

            Hope this helps.

            P 1 Reply Last reply Dec 18, 2020, 2:55 PM Reply Quote 2
            • P
              PeterJones @PeterJones
              last edited by Dec 18, 2020, 2:55 PM

              Tangent:

              I was curious what SCI_DELETEBACKNOTLINE did differently than the normal backspace behavior, so since I had it mapped in that fresh portable, I tried it. If you have text on the line you are editing, that command will erase normally. But if you are at the first character of the line, where a normal backspace would delete the previous line’s EOL characters and take you to the end of the previous line, the SCI_DELETEBACKNOTLINE will not erase the EOL characters or take you to the end of the previous line – it will just stop at the beginning of the line you’re at.

              Interesting. I don’t know that I’ve ever had a desire for the editor to stop me from accidentally backspacing to the previous line… but I guess it’s good to know such a feature exists. :-)

              1 Reply Last reply Reply Quote 3
              • A Alan Kilborn referenced this topic on Apr 19, 2023, 2:24 PM
              1 out of 6
              • First post
                1/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors