Keyboard shortcut not executing well (Adobe Acrobat DC)

Hi all,

I’m having trouble getting KM to execute keyboard shortcuts. I’ve tried to describe it as well as I can, but if I’ve failed, more than happy to answer clarifying questions. Looking forward to learning what I’m missing!

I'm a book indexer, meaning I write indexes that appear in the back of books. This is for a macro I would use to copy names in a PDF, and import them—inverted in last name, first name format—in my indexing software. I can already do that, but I'm looking to add Adobe's shortcut for highlighting words to increase my efficiency/productivity. This macro works perfectly if it begins with me selecting the text with my trackpad, and then starting the macro with the "copy" action. All I've added are the first two type keystroke actions.

  • KM 10.0.2; macOS Monterey 12.2.1

  • Select a name (first name last name), invert it (last name, first name), and paste it.

I already have a macro that successfully takes text I’ve copied, performs a clean-up routine on it, performs a regex expression to invert it to last name, first name format, and pastes it into Cindex (software I use for book indexing).

I would like to take it a step further and add the Adobe Acrobat DC shortcut to select a word (performing it twice, because there are two words to select)—command+shift+right arrow—at the beginning of the macro. I’ve tried adding timed pauses between the two iterations of the shortcut, but that still hasn’t helped.

Command+K is the shortcut to create a new entry in my index in Cindex, incase you're wondering why that's part of the macro.

So, for example:

[cursor at the very left of the following text]

Oomeemungnak Munga

[using shortcuts, both words are copied]

[Cindex is made the active program, name is inverted]

Munga, Oomeemungnak

[stops here, or continues on with the steps of the macro that are currently greyed out]

Image of the macro/file attached.
InvertName copy file.kmmacros (7.6 KB)
invert name copy image

Try replacing your first two actions with:

You may have to fiddle the pauses a bit to get the shortest delay you can live with while still giving Acrobat time to react to the modifier keydowns.

Thanks so much.

Even with the pauses set to 1.5 seconds it's kind of failing. It basically goes over two letters, and stops (doesn't copy), so it's almost as if the modifiers aren't being recognized.

(I found some old threads about security preferences in Apple causing havoc so I'm starting to wonder if this won't be possible to send to Adobe?)

It's working for me, Acrobat DC 2022, KM v10.1.1 and both macOS 10.14 and macOS 12.4.

What wasn't clear from the above was the selection of "Press and hold" from the first action's cogwheel and "Release" for the last.

Adobe apps are often non-standard and this can make life difficult in all sorts of ways. This looks to be one example, never mind that the "correct" Mac shortcut for "word selection" is ⌘⌥⇧...

You might actually find it easier to do the text selection manually, using the macro for the "Copy" action onwards -- that would also make it easier to cope with names more complex than "First Last", eg hyphenated surnames. So "place cursor, hold down ⌘ and ⇧, tap → twice, run macro". More manual work for you, but possibly more consistent and overall better results.

1 Like

Thanks. It's strange it isn't working for me, if it's working for you!

Because I do so much copying of names my thought was to have different versions of this macro for different name combinations. But, yes, unfortunately I may have to select the names using the shortcut on the keyboard. It just feels like twice the amount of work/keystrokes/lack of efficiency.

But, you tried, so thank you!