def addSource(self, name, conf):
    self._sources[name] = conf
    if ('xkey' in conf):
        (devname, row, col) = self._sources[name]['xkey']
        dev = self.dm.getDevice(devname)
        dev.addKeyCallback((row, col), self._hotkeyPressed, (name,))
def addSource(self, name, conf):
    self._sources[name] = conf
    if ('xkey' in conf):
        (devname, row, col) = self._sources[name]['xkey']
        dev = self.dm.getDevice(devname)
        dev.addKeyCallback((row, col), self._hotkeyPressed, (name,))