-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Console]::Beep() does not activate "Bell Notifications" #102211
Comments
Tagging subscribers to this area: @dotnet/area-system-console |
FWIW dotnet folks - |
@DHowett thank you for your input! Do you know if switching from the |
Well, for one thing, it'll make the API actually work as expected over SSH and the like. |
I've marked the issue as
.\build.cmd -c Release -subset clr+libs+libs.tests
.\dotnet.cmd build .\src\libraries\System.Console\System.Console.sln -c Release
.\artifacts\bin\testhost\net9.0-windows-Release-x64\shared\Microsoft.NETCore.App\9.0.0\corerun.exe $pathToDll
|
implement Console.Beep via BEL char, rather than the original pinvoke.
I would say this is a behavioral breaking change and involves some doc changes. Do you think it is necessary to fix the issue? |
Description
This bug was origionally posted at microsoft/terminal#17263, however the developers on that project directed me to this one due to this code not pushing the notification:
runtime/src/libraries/System.Console/src/System/ConsolePal.Windows.cs
Lines 656 to 673 in 039d2ec
Windows Terminal version
1.19.11213.0
Windows build number
10.0.19045.0
Other Software
Powershell v5 and v7
I do have oh-my-posh installed, but I don't think that affects this behavior
Flashing/notifications do appear to be configurable when using the Write-Host -NoNewLine "a"` command however.
Reproduction Steps
Steps to reproduce
o Enable "Bell notificaiton styles" in "Advanced" for your powershell profile.
o Enter the command [Console]::Beep() into the console. Observe, while the terminal does emit an audible beep, it does not alert the user in any other way (via flashing the window or the taskbar as configured).
Expected behavior
Expected Behavior
[Console]::Beep() should respect the user's configuration for bell notifications.
Actual behavior
Actual Behavior
[Console]::Beep() does not respect the user's configuration for bell notifications.
Regression?
No response
Known Workarounds
I can still use write-host "`a", which will produce the desired results.
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: