title: Event is not firing for the first time
body: <p>In RichTextBox, I'm trying to fire an event with pressing period ('.') But It's not working for the first time.</p>
  
  <p>If I write <strong><em>"Lorem Ipsum."</em></strong>, It's not working but If I write <strong><em>"Lorem Ipsum ."</em></strong> or <strong><em>"Lorem Ipsum.."</em></strong> It's OK.</p>
  
  <p>PS: I've added the KelimeGuncelle method and GetWordGroupInstances() dictionary also.</p>
  
  <p>Here's the block:</p>
  
  <pre><code>private void rtbMakale_KeyDown(object sender, KeyEventArgs e)
          {
              if (e.KeyCode == Keys.OemPeriod)
              {
                  kelimeGuncelle();
              }
          }
  </code></pre>
  
  <p>The kelimeGuncelle method:</p>
  
  <pre><code>void kelimeGuncelle()
          {
              Dictionary&lt;String, int&gt; TekliKelimeGruplari = GetWordGroupInstances(1);
              foreach (var item in TekliKelimeGruplari)
              {
                  for (int i = 0; i &lt; lstKelimeler.Items.Count; i++)
                  {
                      var kelime = lstKelimeler.Items[i];
                      string guncellenecekKelime = kelime.ToString().Remove(kelime.ToString().IndexOf(" ( ") - 1);
                      string gelenKelime = item.Key;
                      string _guncellenecekKelime = kelime.ToString();
  
                      int pFrom = _guncellenecekKelime.IndexOf("(") + 1;
                      int pTo = _guncellenecekKelime.LastIndexOf("/");
                      int guncellenecekSayi = Convert.ToInt32(_guncellenecekKelime.Substring(pFrom, pTo - pFrom));
  
                      int kFrom = _guncellenecekKelime.IndexOf("/") + 1;
                      int kTo = _guncellenecekKelime.LastIndexOf(")");
                      int toplamYazilacakSayi = Convert.ToInt32(_guncellenecekKelime.Substring(kFrom, kTo - kFrom));
  
                      int kelimeninSirasi = lstKelimeler.Items.IndexOf(kelime);
                      if (Equals(guncellenecekKelime, gelenKelime))
                      {
                          guncellenecekSayi = item.Value;
                          lstKelimeler.Items.RemoveAt(kelimeninSirasi);
                          lstKelimeler.Items.Insert(kelimeninSirasi, guncellenecekKelime + "  ( " + guncellenecekSayi + "/" + toplamYazilacakSayi + " )");
                          //lstKelimeler.Refresh();
                      }
  
                      if (rtbMakale.Text.Contains(guncellenecekKelime) == false)
                      {
                          lstKelimeler.Items.RemoveAt(kelimeninSirasi);
                          lstKelimeler.Items.Insert(kelimeninSirasi, guncellenecekKelime + "  ( 0/" + toplamYazilacakSayi + " )");
                          //lstKelimeler.Refresh();
                      }
                  }
              }
              TekliKelimeGruplari.Clear();
          }
  </code></pre>
  
  <p>And GetWordGroupInstances:</p>
  
  <pre><code>Dictionary&lt;String, int&gt; GetWordGroupInstances(int GroupSize)
          {
  
              Dictionary&lt;String, int&gt; WordGroupInstances = new Dictionary&lt;string, int&gt;();
  
              String[] sourceText = GetSourceText().Split(' ');
              int pointer = 0;
              StringBuilder groupBuilder = new StringBuilder();
              while (pointer &lt; sourceText.Length - GroupSize)
              {
                  groupBuilder.Clear();
                  int offset = pointer + GroupSize;
                  for (int i = pointer; i &lt; offset; i++)
                  {
                      groupBuilder.Append(" ").Append(sourceText[i]);
                  }
  
                  String key = groupBuilder.ToString().Substring(1);
                  if (!WordGroupInstances.ContainsKey(key))
                  {
                      WordGroupInstances.Add(key, 1);
                  }
                  else
                  {
                      WordGroupInstances[key]++;
                  }
  
                  pointer += 1;
              }
  
              return WordGroupInstances;
  
          }
  </code></pre>