I found the answer as a combination of this: (http://msdn.microsoft.com/en-us/library/aa913008.aspx), and a bit of source code digging that uncovered the undocumented 'AudioUpdateFromRegistry' API.
So this bit of code does the trick:
using Microsoft.Win32;
namespace CEAudio
{
public enum KeyClickVolume
{
Off,
Soft,
Loud
};
public class Utility
{
[DllImport("coredll.dll")]
public static extern void AudioUpdateFromRegistry();
static readonly string KeyVolRegKey = @"HKEY_CURRENT_USER\ControlPanel\Volume";
public static KeyClickVolume KeyClickVolume
{
set
{
uint[] vals = new uint[] { 0, 1, 0x10002 };
Registry.SetValue(KeyVolRegKey, "Key", vals[(int)value], RegistryValueKind.DWord);
AudioUpdateFromRegistry();
}
get
{
switch((uint)Registry.GetValue(KeyVolRegKey, "Key", (uint)0x10002))
{
case 0: return KeyClickVolume.Off;
case 1: return KeyClickVolume.Soft;
case 0x10002:
default: return KeyClickVolume.Loud;
}
}
}
}
}