docstr: action - string, the name of the virtual event these keys will be
           mapped to
  currentKeys - list, a list of all key sequence lists currently mapped
           to virtual events, for overlap checking
  _htest - bool, change box location when running htest
docstr_tok: ["action","-","string",",","the","name","of","the","virtual","event","these","keys","will","be","mapped","to","currentKeys","-","list",",","a","list","of","all","key","sequence","lists","currently","mapped","to","virtual","events",",","for","overlap","checking","_htest","-","bool",",","change","box","location","when","running","htest"]
code: def __init__(
      self, parent, title, action, currentKeySequences, _htest=False
  ):
      """
      action - string, the name of the virtual event these keys will be
               mapped to
      currentKeys - list, a list of all key sequence lists currently mapped
               to virtual events, for overlap checking
      _htest - bool, change box location when running htest
      """
      Toplevel.__init__(self, parent)
      self.configure(borderwidth=5)
      self.resizable(height=FALSE, width=FALSE)
      self.title(title)
      self.transient(parent)
      self.grab_set()
      self.protocol("WM_DELETE_WINDOW", self.Cancel)
      self.parent = parent
      self.action = action
      self.currentKeySequences = currentKeySequences
      self.result = ""
      self.keyString = StringVar(self)
      self.keyString.set("")
      self.SetModifiersForPlatform()  # set self.modifiers, self.modifier_label
      self.modifier_vars = []
      for modifier in self.modifiers:
          variable = StringVar(self)
          variable.set("")
          self.modifier_vars.append(variable)
      self.advanced = False
      self.CreateWidgets()
      self.LoadFinalKeyList()
      self.withdraw()  # hide while setting geometry
      self.update_idletasks()
      self.geometry(
          "+%d+%d"
          % (
              parent.winfo_rootx()
              + (parent.winfo_width() / 2 - self.winfo_reqwidth() / 2),
              parent.winfo_rooty()
              + (
                  (
                      parent.winfo_height() / 2
                      - self.winfo_reqheight() / 2
                  )
                  if not _htest
                  else 150
              ),
          )
      )  # centre dialog over parent (or below htest box)
      self.deiconify()  # geometry set, unhide
      self.wait_window()
  
file_path: catboost/contrib/tools/python/src/Lib/idlelib/keybindingDialog.py
imports: from Tkinter import *
  import tkMessageBox
  import string
  import sys
label_desc: Use image node_id 1 to create a new GetKeysDialog object from inherited base classes: Toplevel with example: obj = GetKeysDialog(parent, title, action, currentKeySequences, _htest)