'Remove the keybindings before they are changed.'

def RemoveKeybindings(self):

    self.Bindings.default_keydefs = keydefs = idleConf.GetCurrentKeySet()
    for (event, keylist) in keydefs.items():
        self.text.event_delete(event, *keylist)
    for extensionName in self.get_standard_extension_names():
        xkeydefs = idleConf.GetExtensionBindings(extensionName)
        if xkeydefs:
            for (event, keylist) in xkeydefs.items():
                self.text.event_delete(event, *keylist)
