Add a key to the diagram