def check_hotkey_unique(self, modifiers, hotKey, newFilterPattern, targetItem):
for item in self.allFolders:<EOL><INDENT>if model.TriggerMode.HOTKEY in item.modes:<EOL><INDENT>if item.modifiers == modifiers and item.hotKey == hotKey and item.filter_matches(newFilterPattern):<EOL><INDENT>return item is targetItem, item<EOL><DEDENT><DEDENT><DEDENT>for item in self.allItems:<EOL><INDENT>if model.TriggerMode.HOTKEY in item.modes:<EOL><INDENT>if item.modifiers == modifiers and item.hotKey == hotKey and item.filter_matches(newFilterPattern):<EOL><INDENT>return item is targetItem, item<EOL><DEDENT><DEDENT><DEDENT>for item in self.globalHotkeys:<EOL><INDENT>if item.enabled:<EOL><INDENT>if item.modifiers == modifiers and item.hotKey == hotKey and item.filter_matches(newFilterPattern):<EOL><INDENT>return item is targetItem, item<EOL><DEDENT><DEDENT><DEDENT>return True, None<EOL>
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