...
private Subject<int> myHotkey = new Subject<int>();
public MainForm()
{
...
myHotkey
.AsObservable()
.Throttle(TimeSpan.FromSeconds(1))
.Subscribe(hotkeyid => MessageBox.Show("Нажата горячая клавиша с ID: " + hotkeyid));
}
...
protected override void WndProc(ref Message keyPressed)
{
...
switch (keyPressed.WParam.ToInt32())
{
case 1:
{
SetPrtSc();
myHotkey.OnNext(keyPressed.WParam.ToInt32());
}
break;
...