def key_to_dict(keys: list) -> dict:
    """Convert route cipher key to dictionary.

    Take a route cipher key in list format where integers are column numbers
    and positive/negative is the route direction and convert to a dictionary
    where the column numbers are keys and the route direction as
    ``up``/``down`` are the values.

    Args:
        keys (list): List of integers with direction as positive/negative.

    Returns:
        Integers keys and ``up``/``down`` as values.

    """
    dictionary = dict()
    for key in keys:
        if key < 0:
            # Negative key is 'down'
            dictionary[abs(key)] = 'down'
        else:
            # Positive key is 'up'
            dictionary[key] = 'up'
    return dictionary