public KeyboardSilencer() { KeyDown += (s, e) => { e.Handled = true; }; KeyUp += (s, e) => { e.Handled = true; }; Subscribe(); }