Skip to content

Specify an audio file for the audible bell #8366

@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

Description of the new feature/enhancement

Please let me configure the audible bell so that it plays a sound other than "Critical Stop". I'd like to select a sound with a shorter duration and perhaps lower volume.

This request is for Windows Terminal, not the console host.

Proposed technical implementation details (optional)

Ever since #7679, the implementation of the audible bell hardcodes SND_ALIAS_SYSTEMHAND:

const auto soundAlias = reinterpret_cast<LPCTSTR>(SND_ALIAS_SYSTEMHAND);
PlaySound(soundAlias, NULL, SND_ALIAS_ID | SND_ASYNC | SND_SENTRY);

I can think of two ways to make this configurable:

  • Let me specify the path of a sound file in settings.json. I think this should be configurable per profile, like the bellStyle setting (Feature Request: disable bell #2360) is.

  • Alternatively, register Windows Terminal with the "Change system sounds" feature in Control Panel so that I can choose a sound there. According to C++ at Work: Web Version Checking, Adding Sound to an App, this involves the HKEY_CURRENT_USER\AppEvents\Schemes\Apps Registry key and the SND_APPLICATION flag. I suspect that the MSIX packaging of Windows Terminal won't allow writing to such Registry keys, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SettingsIssues related to settings and customizability, for console or terminalHelp WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions