def key_parse(keystring):
    """
    parse the keystring/keycontent into type,key,comment
    :param keystring: the content of a key in string format
    """
    # comment section could have a space too
    keysegments = keystring.split(" ", 2)
    keystype = keysegments[0]
    key = None
    comment = None
    if len(keysegments) > 1:
        key = keysegments[1]
        if len(keysegments) > 2:
            comment = keysegments[2]
    return (keystype, key, comment)