/// <summary> /// process key presses /// </summary> /// <param name="e"></param> private void ProcessKeys(KeyEventArgs e) { //start the search if (e.KeyCode == Keys.Return) { InitialSearch(); } //close the form else if (e.KeyCode == Keys.Escape) { mProjectView.FindInTextVisible = false; mProjectView.ObiForm.UpdateFindInTextMenuItems(); if (mProjectView.CanFocusOnTOCView) { mProjectView.FocusOnTOCView(); } else if (mProjectView.CanFocusOnContentView) { mProjectView.FocusOnContentView(); } } //find previous or next else if (e.KeyCode == Keys.F3) { if (CanFindNextPreviousText) { if (Control.ModifierKeys == Keys.Shift) { FindPrevious(); } else { FindNext(); } } } //maybe the user wants to start a new search else if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) { StartNewSearch(m_TocView, m_ContentView, m_ViewToSearchIn); } }