Feature request - Copy/Paste in Telnet

186 views
Skip to first unread message

superjer2000

unread,
Oct 29, 2022, 3:27:56 PM10/29/22
to mTCP
I have been blown away at how amazing MTCP is since I found it sometime after I acquired a 5150 (which was then upgraded with a NIC).

I often use MTCP Telnet to BBS and a few BBSs don't support any type of quoting when responding to emails/forum posts etc.  Being able to select, copy and paste text in the Telnet client would be a feature for my use case.  (Mouse based would be incredible, but a simpler text based implementation would also be great - (e.g. press F3 and then use cursor keys to move to begin selection and then another F-key to start/end selection for example).

Not sure if this is even remotely possible or a desirable feature for others but I thought I'd raise it.

(One other feature that would be awesome is z-modem support, but that might be pushing it! :-))

Michael Brutman

unread,
Oct 29, 2022, 11:03:28 PM10/29/22
to mTCP
There is a fork of the Telnet client that supports a mouse and a clipboard - I have a link to it on the mTCP home page.  That version also supports Unicode and a few other goodies.  I recently spoke to the author of the code and that prompted a round of performance improvements for the Unicode support.  (I clued him in that a linear search through his mappings for Unicode codepoints could easily be sped up by using a binary search, or even hashing.)

I might add mouse support and cut and paste one day, but Unicode and keyboard mappings are higher on the list.  In the interim that other version exists.  (It is quite a bit bigger than mine though.)

Zmodem technically is useless on a TCP/IP connection ...  Zmodem was faster than Xmodem or Ymodem because it borrowed the concept of a sliding window from TCP.  TCP is already doing error handling and the sliding window, so Zmodem is just overhead on a TCP based connection.

Y-Modem probably makes the most sense, as it can send metadata so that you don't have to re-type filenames and the file size doesn't get rounded to the nearest block size.  Xmodem and Ymodem were fairly easy to implement.  Given how complicated Zmodem is, I'm taking a pass on that.


-Mike

superjer2000

unread,
Oct 30, 2022, 7:30:10 PM10/30/22
to mTCP
Thanks for the reply - I saw the Telnet fork and the mouse support but totally missed the clipboard aspect.  I had read it as just supporting sending mouse control escape codes to a server but I see the bits talking about the clipboard support (and also the parts noting it's slower than the main version.)  I will download it and give it a try.  

I've never had any issues regarding Unicode or extended keyboard mappings in my usage...Maybe I need to think of other use cases to telnet from my 5150.

Any file transfer scheme would be great (ZModem, YModem, even XModem) - it's just nice to be able to download files directly from an internet BBS without needing to load up Procomm Plus or something similar using a serial to TCP adapter.

Michael Brutman

unread,
Oct 30, 2022, 7:42:50 PM10/30/22
to mTCP
I think the changes to make Unicode code pointers faster to look up improved the performance, but I haven't measured it directly.

Normally I just set my terminal to use a non Unicode code page, but that's kind of anti-social to anybody who can't use the standard 437 codepage.  It's kind of difficult because the standard 437 codepage has many characters, but it's not possible to do the full range of Unicode without a bitmapped display or loadable fonts.

I'm confused by your last statement ..  the current Telnet client has support Xmodem, Xmodem 1K, and Ymodem batch for years.  On a Unix system you have to put your TTY into a raw mode, otherwise control characters will get in the way.  The instructions are in the PDF docs.


-Mike

superjer2000

unread,
Nov 2, 2022, 12:46:56 AM11/2/22
to mTCP

Yup, there it is!  Plain as day in the manual.  I had read through it when I first installed mTCP a couple of years ago but must have missed that, or forgot.  Time to logon to some BBS and download some files!  Sorry for the confusion, a complete miss on my part. 

Michael Brutman

unread,
Nov 2, 2022, 11:21:26 PM11/2/22
to mTCP
According to SVN, Xmodem and Y modem were added in 2013. :)

I've tested against Synchronet and rz/sz under Unix.  Both were true Telnet connections, but it should work on "fake" Telnet connections too.  ("Fake" means a serial BBS that is internet accessible via a Telnet client, but it doesn't actually use the Telnet protocol.)  When connecting to systems like that use the -sessiontype raw option on the command line to turn off the Telnet protocol.

Let me know if you have problems.
Reply all
Reply to author
Forward
0 new messages