/// <summary>
 /// This method is called on each Keypress
 /// </summary>
 /// <returns>
 /// True, if the key is handled by this method and should NOT be
 /// inserted in the textarea.
 /// </returns>
 protected internal virtual bool HandleKeyPress(char ch)
 {
     if (KeyEventHandler != null)
     {
         //DC: modified the code below to be able to handle multiple invocations (one of which might have handled the key)
         foreach (var eventHandler in KeyEventHandler.GetInvocationList())
         {
             var handledByEventHandler = (bool)eventHandler.DynamicInvoke(ch);
             if (handledByEventHandler)
             {
                 return(true);
             }
             //return KeyEventHandler(ch);
         }
     }
     return(false);
 }