This feature already exists. Right click the tray icon and select Setup Shortcut. The key that you press will act as an on off switch. Based on my keyboard layout, I use the Pause button.