Skip to content

Instantly share code, notes, and snippets.

@Zettt
Last active March 11, 2023 10:11
Show Gist options
  • Save Zettt/62163956ae9ae127a85fec88aa38837e to your computer and use it in GitHub Desktop.
Save Zettt/62163956ae9ae127a85fec88aa38837e to your computer and use it in GitHub Desktop.
Paste by Typing: Binance Copy/Paste (Mac only)

If you are annoyed as much as I am by Binance inability to paste clipboard values into the order boxes, you're welcome. (Please do us all a favor and file a bug report too!)

On a Mac you can simply use an AppleScript to type everything that is on the clipboard for you. The script is this:

try
	the clipboard as text
on error
	set the clipboard to " "
end try

tell application "System Events"
	keystroke (the clipboard as text)
end tell

Setup:

  1. Create a new Quick Action in Automator.
  2. Input is "no input". Execute in "any application".
  3. Add a Run Applescript action, and paste the script above into it.
  4. Save the action, and remember its name.
  5. Now open System Preferences → Keyboard → Shortcuts.
  6. Under Services → General should be your new action. Double click the shortcut column next to it to assign a custom shortcut to this action.

Making it Faster

It's a little slow, if you do it using macOS only. That's why I always always always recommend using Keyboard Maestro. (Yes, I'm very biased. Check out my Keyboard Maestro macros here, and my Markdown macros here.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment