private void Window_Loaded(object sender, RoutedEventArgs e) { SettingsBtn.IsChecked = true; _hotkeyManager = new HotkeyManager(); _hotkeyManager.CreateHotkey(Modifiers.ModControl, 0x14); //caps-lock _hotkeyManager.HotKeyPressed += HotkeyOnHotKeyPressed; }