/// <summary>
        ///     Helper method to cleanly register a hotkey
        /// </summary>
        /// <param name="failedKeys"></param>
        /// <param name="functionName"></param>
        /// <param name="hotkeyString"></param>
        /// <param name="handler"></param>
        /// <returns></returns>
        private static bool RegisterHotkey(StringBuilder failedKeys, string functionName, string hotkeyString, HotKeyHandler handler)
        {
            var modifierKeyCode = HotkeyControl.HotkeyModifiersFromString(hotkeyString);
            var virtualKeyCode  = HotkeyControl.HotkeyFromString(hotkeyString);

            if (!Keys.None.Equals(virtualKeyCode))
            {
                if (HotkeyControl.RegisterHotKey(modifierKeyCode, virtualKeyCode, handler) < 0)
                {
                    Log.Debug().WriteLine("Failed to register {0} to hotkey: {1}", functionName, hotkeyString);
                    if (failedKeys.Length > 0)
                    {
                        failedKeys.Append(", ");
                    }
                    failedKeys.Append(hotkeyString);
                    return(false);
                }
                Log.Debug().WriteLine("Registered {0} to hotkey: {1}", functionName, hotkeyString);
            }
            else
            {
                Log.Info().WriteLine("Skipping hotkey registration for {0}, no hotkey set!", functionName);
            }
            return(true);
        }
        /// <summary>
        /// Helper method to cleanly register a hotkey
        /// </summary>
        /// <param name="failedKeys"></param>
        /// <param name="functionName"></param>
        /// <param name="hotkeyString"></param>
        /// <param name="handler"></param>
        /// <returns></returns>
        private static bool RegisterHotkey(StringBuilder failedKeys, string hotkeyString, HotKeyHandler handler)
        {
            Keys modifierKeyCode = HotkeyControl.HotkeyModifiersFromString(hotkeyString);
            Keys virtualKeyCode  = HotkeyControl.HotkeyFromString(hotkeyString);

            if (!Keys.None.Equals(virtualKeyCode))
            {
                if (HotkeyControl.RegisterHotKey(modifierKeyCode, virtualKeyCode, handler) < 0)
                {
#warning logging
                    //LOG.DebugFormat("Failed to register {0} to hotkey: {1}", functionName, hotkeyString);
                    if (failedKeys.Length > 0)
                    {
                        failedKeys.Append(", ");
                    }
                    failedKeys.Append(hotkeyString);
                    return(false);
                }
#warning logging
                //LOG.DebugFormat("Registered {0} to hotkey: {1}", functionName, hotkeyString);
            }
            else
            {
#warning logging
                //LOG.InfoFormat("Skipping hotkey registration for {0}, no hotkey set!", functionName);
            }
            return(true);
        }
        /// <summary>
        /// Helper method to cleanly register a hotkey.
        /// </summary>
        /// <param name="failedKeys">failedKeys.</param>
        /// <param name="hotkeyString">hotkeyString.</param>
        /// <param name="handler">handler.</param>
        /// <returns>bool success.</returns>
        private static bool RegisterHotkey(StringBuilder failedKeys, string hotkeyString, HotKeyHandler handler)
        {
            Keys modifierKeyCode = HotkeyControl.HotkeyModifiersFromString(hotkeyString);
            Keys virtualKeyCode  = HotkeyControl.HotkeyFromString(hotkeyString);

            if (!Keys.None.Equals(virtualKeyCode))
            {
                if (HotkeyControl.RegisterHotKey(modifierKeyCode, virtualKeyCode, handler) < 0)
                {
                    if (failedKeys.Length > 0)
                    {
                        failedKeys.Append(", ");
                    }

                    failedKeys.Append(hotkeyString);
                    return(false);
                }
            }

            return(true);
        }