QuickCursor Replacement

Edit-Anywhere.kmmacros (16.1 KB)

This macro allows you to use your preferred text editor anywhere. For example, when writing a post to a web forum in a browser window, it is easy to accidentally lose what you have written. However, if you were to write it in a text file and then copy it to the browser window when you were done, you would be much safer.

This macro makes the “round trip” easier by automating the part where the text is copied/cut from the source application, opened in your preferred text editor, and then sent back to the web browser (or any other app) when you are done.

There used to be a Mac app called QuickCursor which would do this, but it was killed by sandboxing.

If you’d like more information about this, see http://www.macstories.net/mac/replacing-quickcursor-with-keyboard-maestro/ and/or https://github.com/tjluoma/edit-anywhere. The former has links to several other implementations that you might prefer over mine.

6 Likes

Hey tjluoma,

Thanks for this! I'm interested in using this macro. Unfortunately, it seems that there are errors. See the following screenshot:

-Cary

Not sure how that happened, it looks fine here. In any event, just
change those to be ⌘A and you should be good to go.

The trouble is non localisation A (QWERTY layout) -> Q (AZERTY layout) :wink:

Ah… I see. Unfortunately I have no idea how to solve that particular issue.

@carycrusiau Just key Cmd ⌘ + A in the Simulate keystroke: field :wink:

The “trouble” is the name of the commande was changed and is now static… The default gives echo of the actual shortcut.

Type a Keystroke is based on keycodes.

So if you change the keyboard layout (or it is different from whoever made the macro), then the keycode will remain the same, but the apparent key (and hence its behaviour) will potentially be different.

Ok. It’s working now. Almost. Indeed, why do you exit the “Source” app? For example, if I’m in Mail.app, since the draft window closes as soon as the app quits, when Mail.app restarts, the draft window is closed. Therefore, the last action (paste) does not work properly.

I has don’t used the right term which is perhaps a different hardware keyboard: I have experienced the same thing with a French keyboard.

The mention “Type the ⌘A Keystroke (This should trigger ‘Select All Text’)” was a renaming nice but generating ambiguity; the default name of "Type a Keystroke"gives echo a the actual key not depending from the actual hardware keyboard.

The source application is not meant to be quit. The ⌘Q that someone else sees is supposed to be ⌘A (select all).

Oh, yes, you’re absolutely right. Silly me! I thought it was in the script. Thx!

Something like Hard codes of the keys, but the actual mapping depend of locale soft informations: perhaps something can be done at the root...

No, pretty much nothing can be done at the root of this - that is what the action is designed to do, simulate keycodes.

Possibly there needs to be some other action that is designed to allow command keys based on letters to be simulated, but that would be a substantially different behaviour than simulating keycodes which is what this action does.

I was surprised today when I noticed QuickCursor was still shown in my Mac App Store "Purchased" list, going back exactly six years to March 2011 when I bought it. So I clicked the "Install" button, and then launched QuickCursor and was pleased to see it is working as designed -- in macOS 10.12.4. The code is still the six year old code -- and the download is only available if you purchased it from the App Store at one time -- and it might die again -- but at least for a while QuickCursor seems to be having a reprieve.

2 Likes