'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'

def __init__(self, parent, title, action, currentKeySequences, _htest=False):

    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()
    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()
    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)))))
    self.deiconify()
    self.wait_window()
