If I start emacsclient like, without the emacs deamon already running:
$ emacsclient -t
or
$ emacsclient -t <filename>
and then press pagedown, emacs inserts the string "6~" into the buffer
at point.
If there is no server present, you should get an error message like
this:
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
emacsclient: No socket or alternate editor. Please use:
--socket-name
--server-file (or environment variable EMACS_SERVER_FILE)
--alternate-editor (or environment variable ALTERNATE_EDITOR)
Please provide a self-contained recipe for reproducing this bug.