def __saveShortcut(act, category, prefClass):
    """
    Private function to write a single keyboard shortcut to the settings.
    
    @param act reference to the action object (E5Action)
    @param category category the action belongs to (string)
    @param prefClass preferences class used as the storage area
    """
    if act.objectName():
        prefClass.settings.setValue('Shortcuts/{0}/{1}/Accel'.format(
            category, act.objectName()), act.shortcut().toString())
        prefClass.settings.setValue('Shortcuts/{0}/{1}/AltAccel'.format(
            category, act.objectName()), act.alternateShortcut().toString())
