profile

Hi! I'm Moncef Belyamani

Paste Text on Sites That Block It Without Extensions or Browser Hacks

Published almost 2 years ago • 2 min read

Hi Reader!

This week's automation tip is a simple one but packs a punch.

It’s 2022, and there are still annoying sites that block pasting into form fields, for passwords, or your bank’s account and routing numbers. If you look up how to bypass this copy-paste restriction, the three most common solutions all have downsides:

  • Use a browser extension, that might only work in certain browsers and only on some sites
  • Change the Firefox configuration settings, which comes with a “Proceed with Caution” warning, and breaks copying and pasting with keyboard shortcuts in Google Docs and other sites
  • Use the browser developer tools to make changes to the source code, which doesn’t work all the time

Today, I’ll show you a simple and safe way to paste on any site that blocks it, using any browser. The easiest and fastest way I’ve found to do this is with Keyboard Maestro, and it only requires a single action.

  1. Launch Keyboard Maestro
  2. ⌘-N to create a new Macro (or File -> New Macro)
  3. In the right pane, replace “Untitled Macro” with a descriptive name like “Paste in sites that block it”
  4. Click on the “New Trigger” green button and select “Hot Key Trigger”, which should be the first choice.
  5. Type in your desired hot key, such as ⌃⌥⌘P (control-option-command-P), then click on the “New Action” green button at the bottom of the right pane.
  6. You should now see an Actions pane on the left that you can search through. Type “insert” in the search field, then double-click on “Insert Text by Typing”
  7. With the cursor inside the text field, click on “Insert Token” above the top right of the text field, then choose “Clipboard”, then “System Clipboard”. You can also directly type %SystemClipboard%.
  8. Click the Edit button at the bottom of the window to get out of edit mode. And that’s it!

Here's what the complete macro looks like:

Now, whenever you need to paste something into a field on one of those pesky sites, all you need to do is press your hot key and Keyboard Maestro will insert it into the field one character at a time as if you were typing it yourself, except it will do it much faster.

To take it a step further, you can create macros that will insert specific text without having to first copy it from somewhere like 1Password. For example, I have two separate macros to insert my bank routing and account numbers that I trigger by typing brout and bnum.

Those macros are very similar to the one above. The only difference is that the trigger is “Typed String Trigger” instead of “Hot Key Trigger”, and instead of %SystemClipboard%, I put in my actual bank routing or account number.

There you have it. I hope you learned something new today. And if you were already doing something similar with a different tool, I’d love to hear about it. Let me know on Twitter or reply to this email.

For more detailed step-by-step screenshots, you can read this guide on my site.

Have a great week!

Moncef

P.S. If you're getting a new Mac, or if you've been thinking about buying Ruby on Mac, I wanted to let you know that I'll be launching the new Ultimate version this week.

It's 40% off now, but the price will go up by $10 for every 10 people who buy, until it reaches $129. Also, the current prices for the Basic and Prime versions will likely go up by $10 too.

What's with the number 10? Well, this week my wife and I will be celebrating our 10th wedding anniversary! And this year also marks two other important 10-year anniversaries:

  • I started my blog in 2012, and my first post was my tutorial for installing Ruby on a Mac
  • I got accepted into the Code for America Fellowship, which changed my life and allowed me to become a full-time developer

Hi! I'm Moncef Belyamani

Every week, I send out an automation tutorial that will save you time and make you more productive. I also write about being a solopreneur, and building helpful things with Ruby. Join 2853 others who value their time.

Read more from Hi! I'm Moncef Belyamani

Hi Reader 👋🏼 Happy Sunday! I hope you and your loved ones are doing well. Earlier this week, I found a great use case for the 1Password CLI that hadn't occurred to me before. I'm gonna use it a lot more often whenever I can! If this email doesn't look right, or if you prefer reading on my site, you can click the title link below. Automate GitHub API Calls With Ruby, Keyboard Maestro, and 1Password CLI One of the perks of the “Ultimate” version of Ruby on Mac is access to the private GitHub...

over 1 year ago • 5 min read

Hi Reader! This week's automation guide is about a free but powerful Mac app called Bunch. I had heard of it years ago but never took the time to explore it in detail. Until now, and it has proven very useful so far. I'm not sure how the code samples will look like in your email, so you might prefer to read this on my site by clicking the title below. Automate Context Switching With Bunch You sit down to work on a feature, and wake up your Mac. Oh hey, Slack is open. You decide to check it...

over 1 year ago • 12 min read
PopClip default extensions

Hi Reader! This week's automation guide is about a little-known app called PopClip. PopClip was originally released in 2011, but I didn’t hear about it until four years ago, and I’m sure there are still a lot of people who don’t know about it. It’s one of the many useful apps you can discover and quickly install with the “Ultimate” version of Ruby on Mac. You can pick and choose from hundreds of Mac apps, fonts, and dev tools in the included Brewfile, and Ruby on Mac will install them all at...

almost 2 years ago • 2 min read
Share this post