private static void Subscribe(Window window) { var windowWatcher = new KeyPressWindowWatcher(); windowWatcher.WatchWindow(window); windowWatcher.SetPreviewKeyDownHandler(e => { foreach (var watcher in Watchers) { watcher.OnPreviewKeyDown(e); } }); windowWatcher.SetKeyDownHandler(e => { foreach (var watcher in Watchers) { watcher.OnKeyDown(e); } }); windowWatcher.SetPreviewKeyUpHandler(e => { foreach (var watcher in Watchers) { watcher.OnPreviewKeyUp(e); } }); windowWatcher.SetKeyUpHandler(e => { foreach (var watcher in Watchers) { watcher.OnKeyUp(e); } }); }