Community
    • Login

    Annoying beep on Alt+Backspace

    Scheduled Pinned Locked Moved General Discussion
    bug
    15 Posts 7 Posters 7.2k 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.
    • dailD
      dail @Tony Lezard
      last edited by

      @Tony-Lezard said:

      “[try] disabling the sound by using windows sound applet”?? Srsly?

      Yes seriously. This is a Windows sound generated by Windows. Open up any application that has text input and press “Alt+Backspace”…guess what…it plays the sound. This is not specific to Notepad++.

      1 Reply Last reply Reply Quote 3
      • Scott SumnerS
        Scott Sumner @Tony Lezard
        last edited by

        @Tony-Lezard

        Welcome to the land of Notepad++, where “workarounds” abound! That’s an answer to your “Srsly?” which I presumes mean “Seriously?” – and, by the way, here’s another “seriously”: If you can’t take the time to spell out words here, most people won’t take you seriously enough to give you a reply.

        So here are some other options that will allow Undo functionality (and can be tied to Alt+Backspace) that don’t sound the “error bell”, at least for me:

        1. a simple Pythonscript:
          editor.undo()

        2. a NppExec command:
          I’m not an expert, so this may not be the most succinct, but it worked for me:
          NPP_CONSOLE 0
          SCI_SENDMSG 2176

        1 Reply Last reply Reply Quote 2
        • Tony LezardT
          Tony Lezard
          last edited by

          Thanks for the warm welcome both of you. dail: so clueless I don’t know where to start. Scott: thanks for the suggestions but all these 3rd party plugins appear to be 32bit only and I was hoping to stick with 64bit NPP. The developers should really be treating this as a bug as ctrl-Z and Alt-Backspace should act identically.

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

            I thought @dail 's answer was a really good one. Guess I’m also in the Clueless Club…

            1 Reply Last reply Reply Quote 0
            • Tony LezardT
              Tony Lezard
              last edited by

              @Alan I’ll explain: dail’s answer misses the point entirely. Yes it’s a Windows sound (the Default Beep), but it’s being triggered by Notepad++. It shouldn’t be doing this because it’s incorrect behaviour from an HCI standpoint, and the key combination should act identically to ctrl-Z. Turning the sound off at the OS level is a global solution to a local problem - it interferes with other applications whose use of sound might be both correct and important. Finally, the rest of what he says is just plain wrong.

              gstaviG 1 Reply Last reply Reply Quote -1
              • gstaviG
                gstavi @Tony Lezard
                last edited by

                @Tony-Lezard I’ll explain.

                What did @dail said which is completely wrong exactly?
                He said: “Open up any application that has text input and press “Alt+Backspace”…guess what…it plays the sound.”
                Did you try it?
                Is it WRONG or RIGHT?

                Microsoft added some default “user interface” related sounds to Windows.
                99% of intelligent users are unaware of them because disabling these sounds is the 3rd thing they do during 1st login to a fresh Windows installation.
                But for those who do not disable them Microsoft cannot trust applications to use them explicitly. The triggering of these sounds is automatic within Microsofts own controls and widgets in response to specific WIN32 messages. An application CAN NOT disable a sound that is generated from within the MENU control in response to some windows message.

                And like most cry babies, who are too lazy to research, you are in the wrong place.
                This forum is for knowledge transfer and workarounds from users to users.
                If you want a fix in the code, go ask a developer here and leave this forum for polite people.

                1 Reply Last reply Reply Quote 1
                • thunderbirdmozT
                  thunderbirdmoz
                  last edited by

                  This isn’t a notepad++ bug. It is a windows bug for beeping on alt-backpsace but not on ctrl-z. Since the two shortcuts do the same function, it is windows that should be treating the two the same and beeping or not beeping. The people you should be talking to to make it consistent is microsoft not the notepad++ developers. When microsoft fixes it, it will also fix your problem with it beeping when you press alt-backspace in other programs.

                  tldr: this is a one of the many microsoft bugs in windows and only microsoft can fix it.

                  gstaviG 1 Reply Last reply Reply Quote 0
                  • gstaviG
                    gstavi @thunderbirdmoz
                    last edited by

                    @thunderbirdmoz
                    Why is it a Microsoft bug?
                    The fact that alt-backspace and ctrl-z have the same functionality in Notepad++ is no concern to Microsoft.
                    You can rearrange the shortcuts any way you want with different functionality and I am quite sure that alt-backspace will still beep.
                    I do not know which Microsoft control intercepts the alt-backspace message(s) and decides to beep. I think that all this beeping is stupid but it is not a bug. At some time someone at Microsoft thought that this notification will be important for the user and added it intentionally as a reaction to some obscure condition which alt-backspace match. I disagree with the need but I doubt it is a bug.

                    1 Reply Last reply Reply Quote 0
                    • thunderbirdmozT
                      thunderbirdmoz
                      last edited by

                      The reason I say that is because the ctl-z and alt-backspace shortcut for undo isn’t a notepad++ thing. Its a standard windows shortcut like ctrl-insert/ctrl-c are for copy and shift-insert/ctrl-v are for paste which other programs use including msoffice. When ctrl-z and alt-backspace are pressed inside notepad++ the keypress is actioned by windows which is why it beeps for alt-backspace and not ctrl-z. notepad++ could intercept the keypress and override the behaviour but that doesnt fix the underlying problem in the big picture for tony-lezard which is that it beeps on alt-backspace in other programs as well. Thats why I said microsoft should be the one fixing this problem.

                      If this is not a bug then it is at least bad design because the two shortcuts have the same functionality so the behaviour should be consistent too. Either both ctrl-z and alt-backspace should beep or they shouldnt. And the beeping should be configurable as a separate entry in controlpanel\sounds but microsoft has shoehorned it into a general entry so if you turn off the beep who knows what else it turns off the beeping for, something else tony-lezard pointed out but again thats because microsoft has caused this.

                      If you want to see where else microsoft has messed up the consistency of ctrl-z and alt-backspace, have a look at it’s behaviour in the notepad program that comes with windows 10. The behaviour is all over the place even though the drop down menu says it should do undo only.

                      1 Reply Last reply Reply Quote 0
                      • gstaviG
                        gstavi
                        last edited by

                        Undo for Notepad++ is implemented within Scintilla.
                        ctrl-z keypress is handled directly by Scintilla. Microsoft code has nothing to do with it.
                        Not sure about alt-backspace (the shortcut mapper GUI is difficult to browse). Possibly Windows intercepts it, beeps and then forwards another message that is captured by Scintilla and trigger undo.

                        1 Reply Last reply Reply Quote 0
                        • Scott SumnerS
                          Scott Sumner
                          last edited by

                          @gstavi said:

                          You can rearrange the shortcuts any way you want with different functionality and I am quite sure that alt-backspace will still beep.

                          Alt+Backspace does not always beep. In the two workarounds I presented above (which can be tied to Alt+Backspace) there is no beep generated.

                          Another quick check of desassigning Alt+Backspace from the Scintilla UNDO action and assigning it to something else I had “empty” shows that it invokes the functionality assigned without beeping.

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

                            @Scott-Sumner is correct and mapping alt-backspace to a different function prevents the BEEP. Probably NPP capture it and fully handle it before it reaches the BEEPING control.

                            I got curious enough to actually open the code. This exist in NPP shortcut table:
                            {TEXT("SCI_UNDO"), SCI_UNDO, true, false, false, VK_Z, IDM_EDIT_UNDO},
                            {TEXT(""), SCI_UNDO, false, true, false, VK_BACK, 0},

                            Initially I thought that maybe NPP is at fault after all because ctrl-z has IDM_EDIT_UNDO which is missing from alt-backspace.
                            But after commenting out the alt-backspace line and compiling I had a version of NPP where alt-backspace no longer UNDO but still BEEPS.
                            Since ALT-xxx shortcuts are often associated with menus I guess that this is the beeping component.

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