private void AcceptInput(object sender, EventArgs e)
 {
     writing = false;
     if (favoriteSaving)
     {
         favoritesPanel.WriteFavoriteName(inputBox.Text);
         favoriteSaving = false;
         CloseKeyboard(null, null);
     }
     else
     {
         if (urlChanging)
         {
             browser.Navigate(inputBox.Text);
         }
         else
         {
             browser.Focus();
             for (int i = 0; i < 50; i++)
             {
                 SendKeys.Send("{BACKSPACE}");
                 SendKeys.Send("{DELETE}");
             }
             browser.Focus();
             SendKeys.Send(inputBox.Text.Replace("+", "{+}").Replace("^", "{^}").Replace("%", "{%}").Replace("(", "{(}").Replace(")", "{)}").Replace("[", "{[}").Replace("]", "{]}"));
         }
         CloseKeyboard(null, null);
     }
     writing = true;
 }