class_docstr: The window frame that lets you add modules to a pipeline
  
      
class_docstr_tok: ["The","window","frame","that","lets","you","add","modules","to","a","pipeline"]
code: def __on_special_key(self, event):
      # Capture keyboard shortcuts
      key = event.GetKeyCode()
      numitems = len(self.__module_list_box.GetItems())
      if key == wx.WXK_ESCAPE:
          self.Close()
          return
      elif key in (wx.WXK_RETURN, wx.WXK_NUMPAD_ENTER):
          self.__on_add_to_pipeline(event)
          return
      elif numitems <= 1:
          # No point moving selector
          pass
      elif key == wx.WXK_DOWN:
          i = self.__module_list_box.GetSelection()
          self.__module_list_box.Select(min(i + 1, numitems - 1))
          return
      elif key == wx.WXK_UP:
          i = self.__module_list_box.GetSelection()
          self.__module_list_box.Select(max(0, i - 1))
          return
      event.Skip()
  
imports: import wx
  from rapidfuzz.utils import default_process
  from rapidfuzz.process import extract
  from rapidfuzz.distance import DamerauLevenshtein
  from cellprofiler_core.utilities.core.modules import get_module_names, instantiate_module, get_module_class
  import cellprofiler.gui
  import cellprofiler.gui.cpframe
  import cellprofiler.gui.help.search
  import cellprofiler.gui.utilities.icon
  import cellprofiler.modules
label_desc: Use image node_id 12 for calling the AddModuleFrame obj's underlying member method code with example usage: obj.__on_special_key(event) without return types