Jump to content

Type (not paste) Clipboard Workflow


Recommended Posts

Type Clipboard Workflow for Alfred App
Simple workflow to write the clipboard content in those situations where ⌘ → V doesn't work, typically in non Cocoa application dialogs. It has happened to me in older Flash versions, Intellij IDEA and a few others. You have to go and paste with right clicking the mouse or pad... Atrocious!!

Setup
After installing the workflow you have to setup the default keyboard shortcut, since Alfred does not auto-import keyboard shortcuts on workflows. I use ⇧⌃⌥⌘ → V, since I don't use it that often.
Alternatively, you can trigger the typing with the typeclipboard keyword.

Usage
Just trigger the shortcut or keyword to type the clipboard content. There's a character cap of 500 characters, to avoid accidents, since the typing takes time depending on the length of the text. If you hit the cap, you'll hear a classic error sound.

Installation
Download the alfred-type-clipboard.alfredworkflow and import to Alfred 2.

 

Source Code

Clone or Fork the Workflow: https://github.com/ramiroaraujo/alfred-type-clipboard-workflow

Changelog

  • 2014-02-04 - Released
Link to post
  • 4 weeks later...
  • 1 month later...
  • 2 years later...
  • 11 months later...
On 12/19/2016 at 11:57 AM, Jack Musick said:

Hi,

 

I've been using this for a while. Recently it started changing the casing in letters at random. Any idea why this would be?

Are you accidentally keeping the shift key pressed while the workflow is running?  That might do it.

 

Link to post
5 hours ago, Empyreal said:

Are you accidentally keeping the shift key pressed while the workflow is running?  That might do it.

 

 

Nope. It's some kind of macOS bug. I ended up fixing it by adjusting the underlying Apple Script to this:

 

on alfred_script(q)
  set chars to count (get the clipboard)
if chars > 500 then
	do shell script "afplay /System/Library/Sounds/Funk.aiff"
else
	tell application "System Events"
		set _index to 1
		repeat with letter in (get the clipboard)
			keystroke letter
			delay 5.0E-4
		end repeat
	end tell
end if
end alfred_script

I've been using it just fine since.

Alfred_Preferences.png

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...