def create_hotkey(self, folder, description, modifiers, key, contents):
modifiers.sort()<EOL>if not self.configManager.check_hotkey_unique(modifiers, key, None, None):<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>self.monitor.suspend()<EOL>p = model.Phrase(description, contents)<EOL>p.modes.append(model.TriggerMode.HOTKEY)<EOL>p.set_hotkey(modifiers, key)<EOL>folder.add_item(p)<EOL>p.persist()<EOL>self.monitor.unsuspend()<EOL>self.configManager.config_altered(False)<EOL>
Create a text hotkey

Usage: C{engine.create_hotkey(folder, description, modifiers, key, contents)}

When the given hotkey is pressed, it will be replaced with the given
text. Modifiers must be given as a list of strings, with the following
values permitted:

<ctrl>
<alt>
<super>
<hyper>
<meta>
<shift>

The key must be an unshifted character (i.e. lowercase)

@param folder: folder to place the abbreviation in, retrieved using C{engine.get_folder()}
@param description: description for the phrase
@param modifiers: modifiers to use with the hotkey (as a list)
@param key: the hotkey
@param contents: the expansion text
@raise Exception: if the specified hotkey is not unique