private void ApplyToggleListening() { if (currentOptions.toggleListening) { try { ghk.register(); } catch { richTextBox.AppendText("Couldn't register hotkey.\r\n"); } } else { try { ghk.unregister(); } catch { richTextBox.AppendText("Couldn't unregister hotkey.\r\n"); } } }
private void applyToggleListening() { if (currentOptions.toggleListening) { try { ghk.register(); } catch { Console.WriteLine("Error registering key properly"); } } else { try { ghk.unregister(); } catch { Console.WriteLine("Error registering key properly"); } } }