code: def check_hotkey_unique(self, modifiers, hotKey, newFilterPattern, targetItem):
          
          for item in self.allFolders:
              if model.TriggerMode.HOTKEY in item.modes:
                  if item.modifiers == modifiers and item.hotKey == hotKey and item.filter_matches(newFilterPattern):
                      return item is targetItem, item
              
          for item in self.allItems:
              if model.TriggerMode.HOTKEY in item.modes:
                  if item.modifiers == modifiers and item.hotKey == hotKey and item.filter_matches(newFilterPattern):
                      return item is targetItem, item
  
          for item in self.globalHotkeys:
              if item.enabled:
                  if item.modifiers == modifiers and item.hotKey == hotKey and item.filter_matches(newFilterPattern):
                      return item is targetItem, item
  
          return True, None
docs: Checks that the given hotkey is not already in use. Also checks the 
          special hotkeys configured from the advanced settings dialog.
          
          @param modifiers: modifiers for the hotkey
          @param hotKey: the hotkey to check
          @param newFilterPattern:
          @param targetItem: the phrase for which the hotKey to be used