<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def translate_key_to_config(p_key):
 """ Translates urwid key event to form understandable by topydo config parser. """

    if len(p_key) > 1:
        key = p_key.capitalize()
        if key.startswith('Ctrl') or key.startswith('Meta'):
            key = key[0] + '-' + key[5:]
        key = '<' + key + '>'
    else:
        key = p_key

    return key