code: def check_shortcuts(self):
          
          conflicts = []
          for index, sh1 in enumerate(self.source_model.shortcuts):
              if index == len(self.source_model.shortcuts)-1:
                  break
              if str(sh1.key) == '':
                  continue
              for sh2 in self.source_model.shortcuts[index+1:]:
                  if sh2 is sh1:
                      continue
                  if str(sh2.key) == str(sh1.key) \
                     and (sh1.context == sh2.context or sh1.context == '_' or
                          sh2.context == '_'):
                      conflicts.append((sh1, sh2))
          if conflicts:
              self.parent().show_this_page.emit()
              cstr = "\n".join(['%s <---> %s' % (sh1, sh2)
                                for sh1, sh2 in conflicts])
              QMessageBox.warning(self, _("Conflicts"),
                                  _("The following conflicts have been "
                                    "detected:")+"\n"+cstr, QMessageBox.Ok)
docs: Check shortcuts for conflicts.