Can't run action with multiple menu options using the same shortcut [SOLVED]

In Apple Numbers I use the shortcut Shift+Cmd+D to delete 1 row.
I would like to have the same shortcut to delete 1 row or delete multiple rows.
When 1 row is selected, the path is
Table/Delete Row
When 2 or more are selected, it's
Table/Delete Rows

I added Delete Row|Delete Rows to my action, but only Delete Row does its thing.
Any idea what might me causing this?

1 Like

Strange, that exact macro works for me.

1 Like

I've just tried this in my copy of Numbers and it seems to work fine to delete row or rows so, I'm not sure why it's not working for you...

1 Like

Remember you can use a regular expression so putting

^Delete Row.*

In menu item should work without issue.

1 Like

@Evan_Mangiamele and @Zabobon
Figured it out.
I also have BetterTouchTool and I had a different shortcut set up that I forgot to delete once I started using KM. It's working now :slight_smile: Thanks for testing it!

1 Like

It's fixed now. Read my reply above.

Can you explain what ^Delete Row.* means in "English"?
Always interested in learning a bit more, since that is not familiar to me.

^ means what follows is a regular expression
Delete Row.* means this regular expression matches “Delete Row” followed by any other character zero or more times

So it will match both “Delete Row” and “Delete Rows” - as well as “Delete Row” followed by any other characters.

So, to be completely accurate, I should have offered up this:

^Delete Rows?

which says match the string “Delete Row” on its own or optionally followed by an “s”.

If that’s come out clearer than mud then I’d say we’re lucky :smile:


Oh I see! Makes sense. Thank you for clarifying :slight_smile: