Well, that depends on how you want the primary/foreign key properties to be visualized.
The attributes part of an ERD node is the text of the node's second label. You could add short hands like "PK" and "FK" to the respective attribute lines.Another possibility would be to use HTML formatting for the attributes label and use underlining or HTML entities to mark specific parts of the text. (Please see How can I achieve different text stylings within one label? for more information on HTML formatting.)Yet another possibility would be to add additional labels with (small) icons cleverly placed before or after the attributes you want to mark.
Sample GraphML.