To cancel any of the line commands, either use the <Delete> key to remove the line command, type over it with spaces or use <PF12> to clear all line commands.
If there are no line commands to cancel and <PF12> is pressed, you will return to the Identify Table screen.