TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to paste slowly (like key typing)

5 pointsby teddyukabout 5 years ago
I want to record a screen cast of code and make it look like I am typing it but my typing is full of mistakes so I want to pre-type it then paste it but make it look like it is me typing it as I record it.<p>Does anyone know of an app for this? I want to paste into pycharm on a mac.<p>Thanks for any tips!

4 comments

juaniuxabout 5 years ago
Check out this page, it has solutions depending on your OS: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;ethack&#x2F;110f7f46272447828352768e6cd1c4cb" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;ethack&#x2F;110f7f46272447828352768e6cd1c...</a>
serfabout 5 years ago
i&#x27;ve used AutoHotkey for this in the past.<p>Here&#x27;s a relevant forum link.[0]<p>I think ahk is mac compatible, but I haven&#x27;t tried it.<p>I had a similar problem in college, to which I made a bash script that called cow-say over and over again to make the cow look as if it were typing, and then recorded that section of the screen.<p>Clunky but effective.<p>Good luck.<p>[0]: <a href="https:&#x2F;&#x2F;www.autohotkey.com&#x2F;boards&#x2F;viewtopic.php?t=26761" rel="nofollow">https:&#x2F;&#x2F;www.autohotkey.com&#x2F;boards&#x2F;viewtopic.php?t=26761</a>
评论 #22888394 未加载
slipwalkerabout 5 years ago
try this: onde you have the entire code ready, working properly, go to the end of the file and &quot;backspace&quot; your entire file clean. Now, from the top of the empty file, repeat &quot;Ctrl-Z&quot; until you have your code restored.<p>of course, it will not work with too large files... you will be limited to the number of undos of your editor.<p>( i used to do this on &quot;live coding&quot; sessions )
Jugurthaabout 5 years ago
It may not be useful in this case, but if you&#x27;re doing command line operations you can use asciinema[0] to generate your screencast as a textfile and edit the typos at specific timestamps when you&#x27;re done.<p>Example:<p>Suppose you wanted to type `sudo su` but typed `suod su` then corrected it. Here&#x27;s part of the file that would be generated:<p><pre><code> [1.886896, &quot;o&quot;, &quot;s&quot;] [1.984919, &quot;o&quot;, &quot;u&quot;] [2.047353, &quot;o&quot;, &quot;o&quot;] [2.150955, &quot;o&quot;, &quot;d&quot;] [2.54311, &quot;o&quot;, &quot; &quot;] [2.629135, &quot;o&quot;, &quot;s&quot;] [2.745892, &quot;o&quot;, &quot;u&quot;] [3.324734, &quot;o&quot;, &quot;\b\u001b[K&quot;] [3.481178, &quot;o&quot;, &quot;\b\u001b[K&quot;] [3.611576, &quot;o&quot;, &quot;\b\u001b[K&quot;] [3.776223, &quot;o&quot;, &quot;\b\u001b[K&quot;] [3.896898, &quot;o&quot;, &quot;\b\u001b[K&quot;] [4.089885, &quot;o&quot;, &quot;\b\u001b[K&quot;] [5.812011, &quot;o&quot;, &quot;u&quot;] [5.978867, &quot;o&quot;, &quot;d&quot;] [6.017407, &quot;o&quot;, &quot;o&quot;] [6.177912, &quot;o&quot;, &quot; &quot;] [6.385136, &quot;o&quot;, &quot;s&quot;] [6.385614, &quot;o&quot;, &quot;u&quot;] </code></pre> You can edit the file, delete the type and correction-delete keys and keep the right one. Yan even edit the timestamp if you want to either with your text editor with macros, or a spreadsheet once you&#x27;re done and decrement by four seconds.<p>When you play it with `asciinema play foobar.cast`, it will play `sudo su`.<p>Quick tip:<p><pre><code> asciinema rec -i 2 deployment_screen.cast </code></pre> The above records the &quot;screen&quot; to a `deployment_screen.cast` file, and reduces all idle time longer than two seconds to two seconds. If you type a character, then pause for an hour, then type another character, the cast will reduce that dead &quot;half hour&quot; to two seconds. Super useful.<p>I use that when I&#x27;m deploying something for the first time and may have to install additional dependencies or edit some config files and haven&#x27;t yet scripted the thing. I record the deployment cast and dispatch it, then put it in the target machine and add a `cat &#x2F;home&#x2F;user&#x2F;README.md` in `.bashrc`. The README.md file explains what the target machine is about, the services that are deployed, and where the cast file is.<p>After all the rough edges are rounded, you can go over the cast file and encode the steps in a Dockerfile or whatever thing you&#x27;re using and not miss a dependency.<p>[0]: <a href="https:&#x2F;&#x2F;asciinema.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;asciinema.org&#x2F;</a>