Paste Slowly - A new type of Action #14945

Open
opened 2026-01-31 04:23:55 +00:00 by claunia · 4 comments
Owner

Originally created by @fischerdouglas on GitHub (Aug 23, 2021).

Description of the new feature/enhancement

Paste Slowly - A new type of Action

Is needed to allow the use of Windows Terminal to operate remote devices based on SSH/Telnet/Serial connections.
The buffers of some remote consoles do not deal very well with to quick insertion of caracteres.

Example:
When configuring a Cisco/Juniper or similar device thought Serial Ports with low-speed connections (like 9600-8-n-1), if you paste a substantial number of configuration lines, is highly likely that some characters will be swallowed, resulting on errors at the final config.

The objective is to create new type of action called on Windows Terminal that Could be Called "Paste Slowly".
-> Or any other better name the community define for that.

With that new action "Paste Slowly", Windows Terminal will process the Copy/Paste buffer, and when inserting each character on the console, will respect the delay defined for each specific character defined on the configurations of Windows Terminal.

Proposed technical implementation details (optional)

Deciding when execute "Paster Slowly" instead of "Normal Paste" - Will be defined by:
A - Specific Key-Shortcut defined at Configuration->Actions
(Ex.: CTRL+V -> Normal Paste, CTRL+Shift+V -> Paste Slowly.)
B - Size of the Copy/Paste buffer on a Paste action.
-> If bigger than NumBytesToPasteSlowly bytes, will prompt an action choose screen, questioning if "Normal Paste" or "Paste Slowly" should be used (like the warning that appears when the Paste Buffer have multiples lines). With a small checkbox defining "Remember that choice".

On Configurations should exist a Multiple-Choice option that will define the behavior of that "Warning POP" with the following options:
- Always "Normal Paste"
- Always "Paste Slowly"
- Prompt for choosing the type of Paste action if Paste Buffer is bigger than NumBytesToPasteSlowly

On Configurations should exist an Array of Delay Definition to Paste Slowly
The Array will have 2 attributes:

  • Character
  • Time to Delay
    The sequence of the array will need to be defined by the Windows Terminal user, and the Rules of delay insertion will be processed Top-Down.

The "Character" attribute, will contain:

  • Groups of characters like "Any Character", "OnlyNumbers", "OnlyAlphaUpperCase", "OnlyAlphaLowerCase", etc.
  • Specific common character (Ex.: "A", "B","C", "a", "b","c", "1", "2","3", "!", "#", etc.)
  • Special characters (Ex.: LineBreak, EndOfFile, etc.)
  • {Maybe consider allowing the use of Regex to give freedom Windows Terminal User?}

The "Time to Delay" attribute will contain:

  • A number positive number between 0 and 2000 that will represent the number of milliseconds that Windows Terminal will wait until processing next character on Paste Buffer.
Originally created by @fischerdouglas on GitHub (Aug 23, 2021). # Description of the new feature/enhancement Paste Slowly - A new type of Action Is needed to allow the use of Windows Terminal to operate remote devices based on SSH/Telnet/Serial connections. The buffers of some remote consoles do not deal very well with to quick insertion of caracteres. Example: When configuring a Cisco/Juniper or similar device thought Serial Ports with low-speed connections (like 9600-8-n-1), if you paste a substantial number of configuration lines, is highly likely that some characters will be swallowed, resulting on errors at the final config. The objective is to create new type of action called on Windows Terminal that Could be Called "Paste Slowly". -> Or any other better name the community define for that. With that new action "Paste Slowly", Windows Terminal will process the Copy/Paste buffer, and when inserting each character on the console, will respect the delay defined for each specific character defined on the configurations of Windows Terminal. # Proposed technical implementation details (optional) Deciding when execute "Paster Slowly" instead of "Normal Paste" - Will be defined by: A - Specific Key-Shortcut defined at Configuration->Actions (Ex.: CTRL+V -> Normal Paste, CTRL+Shift+V -> Paste Slowly.) B - Size of the Copy/Paste buffer on a Paste action. -> If bigger than NumBytesToPasteSlowly bytes, will prompt an action choose screen, questioning if "Normal Paste" or "Paste Slowly" should be used (like the warning that appears when the Paste Buffer have multiples lines). With a small checkbox defining "Remember that choice". On Configurations should exist a Multiple-Choice option that will define the behavior of that "Warning POP" with the following options: - Always "Normal Paste" - Always "Paste Slowly" - Prompt for choosing the type of Paste action if Paste Buffer is bigger than NumBytesToPasteSlowly On Configurations should exist an Array of Delay Definition to Paste Slowly The Array will have 2 attributes: - Character - Time to Delay The sequence of the array will need to be defined by the Windows Terminal user, and the Rules of delay insertion will be processed Top-Down. The "Character" attribute, will contain: - Groups of characters like "Any Character", "OnlyNumbers", "OnlyAlphaUpperCase", "OnlyAlphaLowerCase", etc. - Specific common character (Ex.: "A", "B","C", "a", "b","c", "1", "2","3", "!", "#", etc.) - Special characters (Ex.: LineBreak, EndOfFile, etc.) - {Maybe consider allowing the use of Regex to give freedom Windows Terminal User?} The "Time to Delay" attribute will contain: - A number positive number between 0 and 2000 that will represent the number of milliseconds that Windows Terminal will wait until processing next character on Paste Buffer.
Author
Owner

@fischerdouglas commented on GitHub (Feb 4, 2022):

@zadjii-msft I saw some progres ( #11473 ) on parsing and treating in paste action on last preview release v1.13.10336.0.

any chance to take advantage of the momentum and take a second look at this paste slowly issue?

@fischerdouglas commented on GitHub (Feb 4, 2022): @zadjii-msft I saw some progres ( #11473 ) on parsing and treating in paste action on last preview release v1.13.10336.0. any chance to take advantage of the momentum and take a second look at this paste slowly issue?
Author
Owner

@zadjii-msft commented on GitHub (Feb 4, 2022):

Oh sorry, never followed up here. Team thought it was a cool idea, if albeit a little silly 😄 Like, this is probably not needed like 99% of the time. But when this is needed, there's no other solution.

I think the consensus was the easiest solution was to add a property to PasteTextArgs (or make args for that, since there aren't already). I'm not sure how much more complicated it needs to be than that - the auto detection might be a bit more complicated. But just adding a delayBetweenChars property to PasteTextArgs would be easy. I can help guide if you'd like to take a crack at it 😉

@zadjii-msft commented on GitHub (Feb 4, 2022): Oh sorry, never followed up here. Team thought it was a cool idea, if albeit a little silly 😄 Like, this is probably not needed like 99% of the time. But when this **is** needed, there's no other solution. I think the consensus was the easiest solution was to add a property to `PasteTextArgs` (or make args for that, since there aren't already). I'm not sure how much more complicated it needs to be than that - the auto detection might be a bit more complicated. But just adding a `delayBetweenChars` property to `PasteTextArgs` would be easy. I can help guide if you'd like to take a crack at it 😉
Author
Owner

@fischerdouglas commented on GitHub (Feb 4, 2022):

Thanks for the attention and answer @zadjii-msft

I see you already got the importance of this feature to some of us.
But just to give context on this, I'll take the liberty of bringing you some links that talk about how this is handled in other terminal tools.

Cisco users forum - Tera Term - Paste delay time per line
https://learningnetwork.cisco.com/s/question/0D53i00000Kt7BS/how-to-slow-down-commands-when-pasting-itno-terminal-prompt

Mobaxterm - Paste delay
https://mobaxterm.mobatek.net/documentation.html#4_9_7

SecureCRT - Other Features - Delay options
https://www.vandyke.com/products/securecrt/features.html#:~:text=two%20SecureCRT%20windows.-,Delay%20options,-W

Iterm2 - Edit > Paste Slowly
https://iterm2.com/documentation/2.1/documentation-menu-items.html#::text=spaces%20and%20backslashes.-,Edit%20%3E%20Paste%20Slowly,-%22Paste%20Slowly%22%20pastes
Iterm2 - Hidden Settings > Paste Slowly
https://iterm2.com/documentation-hidden-settings.html#:
:text=the%20speed%20that-,%22paste%20slowly%22,-pastes%20at%3A

Thanks again!

@fischerdouglas commented on GitHub (Feb 4, 2022): Thanks for the attention and answer @zadjii-msft I see you already got the importance of this feature to some of us. But just to give context on this, I'll take the liberty of bringing you some links that talk about how this is handled in other terminal tools. **Cisco users forum - Tera Term - Paste delay time per line** https://learningnetwork.cisco.com/s/question/0D53i00000Kt7BS/how-to-slow-down-commands-when-pasting-itno-terminal-prompt **Mobaxterm - Paste delay** https://mobaxterm.mobatek.net/documentation.html#4_9_7 **SecureCRT - Other Features - Delay options** https://www.vandyke.com/products/securecrt/features.html#:~:text=two%20SecureCRT%20windows.-,Delay%20options,-W **Iterm2 - Edit > Paste Slowly** https://iterm2.com/documentation/2.1/documentation-menu-items.html#:~:text=spaces%20and%20backslashes.-,Edit%20%3E%20Paste%20Slowly,-%22Paste%20Slowly%22%20pastes **Iterm2 - Hidden Settings > Paste Slowly** https://iterm2.com/documentation-hidden-settings.html#:~:text=the%20speed%20that-,%22paste%20slowly%22,-pastes%20at%3A Thanks again!
Author
Owner

@network-shark commented on GitHub (Apr 10, 2024):

@fischerdouglas thanks for collecting all the links. It would be good if terminal can support it .This feature is the only reason I can uninstall securecrt which feels like software from the eighties

@network-shark commented on GitHub (Apr 10, 2024): @fischerdouglas thanks for collecting all the links. It would be good if terminal can support it .This feature is the only reason I can uninstall securecrt which feels like software from the eighties
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14945