in reply to key's -> hex values
If you want the character whose ordinal value is 0x1c, say
chr(0x1c) -- but 0x1c is nothing to do with the return key AFAICT. Can't speak as to sockets, but a return will be 0x0a or 0x0d or both. You might even see if send("") does what you want.