I build a small Windows app that plays a mechanical switch sound for every key you press. The questions I get most are all variations of "why is it silent in this one program?", so here is how these apps work and where they break.
How the app hears your keys. Windows lets a program install a low-level keyboard hook (SetWindowsHookEx with WH_KEYBOARD_LL). Windows calls your function for every key event before it reaches the focused window. The hook gets a key code, not a document, and a sound app only needs the code to choose between a letter, Space, Enter or Backspace sound. It is also the same mechanism keyloggers use, which is why antivirus tools are suspicious of this whole category and why you should pick an app that says plainly it does not record or send keys, and then check that its network activity is empty (Resource Monitor works).
Why it goes silent in some windows. Windows has a rule called User Interface Privilege Isolation. A normal app cannot observe input going to a window that runs as administrator. Microsoft lists an elevated target application as a common cause of this kind of failure in its UI automation troubleshooting page, and developers hit the same thing with LowLevelKeyboardProc: it does not catch keys for an elevated window. That is why every keyboard sound app is silent in Task Manager started as admin, at UAC prompts and on the sign-in screen. Running the sound app as administrator is the usual workaround, with a catch: an autostart entry that needs elevation is skipped at sign-in without any message (one Mechvibes issue describes exactly this).
Delay. The only number that matters to the person typing is how long after the press they hear it. Starting a player for each key is too slow, so Boardtone keeps one audio stream open and mixes the sample into it. On my test PC the median from the hook callback to handing the sound to the audio driver was about 5 ms. That leaves out the audio buffer and the sound card, so it is only the app's share of the delay.
Not sounding like a machine gun. Playing the same sample for every key is obvious after a minute. Boardtone keeps several variants per key type and never plays the same one twice in a row, shifts the pitch a little, and pans left-hand keys left and right-hand keys right. The sounds themselves are generated (a burst of noise through resonant filters) instead of recorded, so there are no samples to license.
Bringing sounds from Mechvibes. Mechvibes packs keep every key in one long audio file with a table of start and end times. Mechvibes 3 switched to a new table format (key names like KeyA and a second timing for the key release), so a converter has to read both. I wrote a small converter that reads both and cuts the file into separate WAVs with a pack.json; it runs in the browser with the Web Audio API, so nothing is uploaded: https://boardtone.pages.dev/mechvibes-sound-packs/?utm_source=devto&utm_medium=social&utm_campaign=bt-1201 . The command line version is MIT on GitHub: https://github.com/Tommyapi/mechvibes-pack-convert
If you want the longer troubleshooting list it is here: https://boardtone.pages.dev/keyboard-sound-not-working-windows/?utm_source=devto&utm_medium=social&utm_campaign=bt-1201 . The app is Boardtone (disclosure: I made it). One sound is free, Pro is $7.99 once, the installer is not code signed yet so SmartScreen will warn. https://boardtone.pages.dev/?utm_source=devto&utm_medium=social&utm_campaign=bt-1201