internal bool DoBindFunction(Keys key)
 {
     //Условие 1: клавиша без модификатора.
     if (key == this.key && !shiftDetected && !controlDetected && !altDetected && !winDetected && bindFunctions.Nomod != null)
     {
         bindFunctions.Nomod();
         return(true);
     }
     //Условие 2: клавиша с модификатором shift.
     if (key == this.key && shiftDetected && !controlDetected && !altDetected && !winDetected && bindFunctions.Shiftmod != null)
     {
         bindFunctions.Shiftmod();
         return(true);
     }
     //Условие 3: клавиша с модификатором ctrl.
     if (key == this.key && !shiftDetected && controlDetected && !altDetected && !winDetected && bindFunctions.Controlmod != null)
     {
         bindFunctions.Controlmod();
         return(true);
     }
     //Условие 4: клавиша с модификатором alt.
     if (key == this.key && !shiftDetected && !controlDetected && altDetected && !winDetected && bindFunctions.Altmod != null)
     {
         bindFunctions.Altmod();
         return(true);
     }
     //Условие 5: клавиша с модификатором win.
     if (key == this.key && !shiftDetected && !controlDetected && !altDetected && winDetected && bindFunctions.Winmod != null)
     {
         bindFunctions.Winmod();
         return(true);
     }
     //Условие 6: клавиша с модификатором ctrl+shift.
     if (key == this.key && shiftDetected && controlDetected && !altDetected && !winDetected && bindFunctions.CtrlShiftmod != null)
     {
         bindFunctions.CtrlShiftmod();
         return(true);
     }
     //Условие 7: клавиша с модификатором ctrl+alt.
     if (key == this.key && !shiftDetected && controlDetected && altDetected && !winDetected && bindFunctions.CtrlAltmod != null)
     {
         bindFunctions.CtrlAltmod();
         return(true);
     }
     //Условие 8: клавиша с модификатором shift+alt.
     if (key == this.key && shiftDetected && !controlDetected && altDetected && !winDetected && bindFunctions.ShiftAltmod != null)
     {
         bindFunctions.ShiftAltmod();
         return(true);
     }
     //Условие 9: клавиша с модификатором shift+ctrl+alt.
     if (key == this.key && shiftDetected && controlDetected && altDetected && !winDetected && bindFunctions.ShiftCtrlAltmod != null)
     {
         bindFunctions.ShiftCtrlAltmod();
         return(true);
     }
     ModifierUnregister();
     return(false);
 }