How to not play default beep sound when pressing alt key?

2024-05-28T02:14:08.52+00:00

I'm implementing the wpf app, and added the shortcut feature with alt key combination.

The problem is that the app window is open and active(focused) and I press alt + shift + U(alt key added shortcut),

then the default alert sound is playing from OS.

I want to know why the alert sound is playing when I press alt key combinated shortcut.

Is there any other policy for alt key in Windows OS?

And is there any solution to avoid this alert sound?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,415 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yanhong Liu 14,185 Reputation points Microsoft External Staff
    2024-05-28T06:28:59.5166667+00:00

    Hello,

    Thank you for posting in Q&A forum.

    Please navigate to Control Panel\Hardware and Sound\Change System Sound, find "Default Sound" under the "Windows" list of Program Events, and then select the "(None)" option in the "Sound" drop-down menu below. This should set the default beep to silent.

    I hope the information above is helpful.

    Best Regards,

    Yanhong Liu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.


  2. Sevag Krikorian 0 Reputation points
    2025-02-09T06:21:17.3366667+00:00

    I hope you have solved your problem by now, this answer may help others.

    In order to avoid the default beep sound when using ALT key for key combinations, have your application process the WM_SYSCHAR message and return zero in cases where you handle the input.

    return 1 if you don't process the message and want to keep the system ALT key function (opening menus).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.