'Read the configuration.
Config format: key = command, e.g.:
<Ctrl+Q> = quit
Args:
modename: Name of the mode to use.'

def read_config(self, modename=None):

    if (modename is None):
        if (self._modename is None):
            raise ValueError('read_config    called    with    no    mode    given,    but    None    defined    so    far!')
        modename = self._modename
    else:
        self._modename = modename
    self.bindings = {}
    self.special_bindings = {}
    keyconfparser = objreg.get('key-config')
    for (key, cmd) in keyconfparser.get_bindings_for(modename).items():
        assert cmd
        self._parse_key_command(modename, key, cmd)
