Thanks everybody for your replies!
@ togores:
Only allowing points would be too restrictive.
@ T.Willey:
Your suggestion would not work. (ssget) returns nil in the two situation I am trying to distinguish.
@ RenderMan:
I don't understand. When or how would the error to trigger the (*error*) function occur?
@ owenwengerd:
You make a valid point. But I don't agree with the statement 'there is nothing to distinguish':
Case 1: The user has selected points in the graphic screen before pressing enter => empty set.
Case 2: The user has just pressed enter => null response.
@ CAB:
(setq ss (ssget ":S"))
if so then this is valid (= (getvar "ERRNO") 52) for ENTER only without an attempted selection.
An attempted selection returns 0
So in certain (ssget) situations the errno variable can be used! I did not know this.
I will have to do some rethinking:
Does the command have to be continuous? Instead of n separate selections, the user can also create a single bigger selection. And if the command is continuous, is using (ssget ":S") acceptable or too restrictive?