Definitely a conundrum. You could possibly check @OTHER(18) and if the value and the record are the same and @OTHER(18) = 0, then they pressed <cr>. If @OTHER(18) is 4 or 22 then they pressed the down arrow or tab (respectively).
Would that help?
Oh, and also note the @ORIG.REC thing is fine if the value is in @RECORD. If the value is in @WORK... well, that's another issue.
Maybe something like this:
LOCAL L.VAR
*
CASE (@LINE<1,1> = 0)
L.VAR = KEY
CASE (@LINE<1,1> > 0)
L.VAR = @RECORD<@LINE<1,1>>
CASE (@LINE<1,1> < 0)
L.VAR = @WORK<ABS(@LINE<1,1>)>
END CASE
*
IF @VALUE = L.VAR THEN
IF @OTHER(18) = 0 THEN
ERROR 'DUDE! seriously?'
END
END
This doesn't handle the situation with Prelude where they store stuff in like <27,8> but it could easily be adapted for that kind of thing.
And of course, you might flavor the message to taste...
