In this respect it might be interesting, that in the newest version (-rc1) a single left-click shall copy the hypertext into clipboard, see https://stackoverflow.com/a/61924355/11769765.
For older versions like gnuplot 5.2, the following code is a (not very efficient) work-around to
grab the closest data point:
set print $Data
do for [x=-5:5] {
print x, x**2
}
unset print
set table $Text
plot $Data us (sprintf("x=%g, y=%g",$1,$2)) w table
unset table
array snappoint[1]
set macro
myplot = 'plot $Data u 1:2:($Text[$0+1]) w labels hypertext point pt 7 lc 1 title "f(x)"'
bind Button1 'mx=MOUSE_X; my=MOUSE_Y; i=1;\
set table $distance; \
plot $Data u (d=sqrt(($1-mx)**2+($2-my)**2), di=$0==0?(xi=$1,yi=$2,d):\
(d<di?(i=int($0+1),xi=$1,yi=$2,d):di), d) w table;\
unset table;\
print i," ", $Text[i];\
@myplot, snappoint us (xi):(yi) pt 6 ps 2 lc 3 t $Text[i]'
@myplot
A left click marks the closest point and prints e.g. 3 x=-3, y=9 to the console.

For simplicity, the distance is computed here only with axis coordinates, while screen coordinates would be better. The transformation could be done with variables GPVAL_X_MIN, etc.