public MainWindow() { InitializeComponent(); KeyboardHook.CreateHook(); KeyboardHook.KeyPressed += KeyboardHook_KeyPressed; }