Is there a menu item which is enabled when I am in the editor and disabled when I select (focus on) the item name?

I am writing a keyboard maestro macro and need to differentiate when I am in the editor vs selecting the name of the document.
thanks in advance for your time and help

What does the macro do?

it copies the name of the document into the editor (as a title at the top).
The macro must work in 2 circumstances: when the focus is on the name of the document is selected and when the cursor is in the editor itself. I have to use an if them else action.
thank you for your reply

Is this a Markdown document?
If so, what element, e.g., H1, etc., are you using?

I found the solution. Paste and Match Style is enabled only in the editor. Thank you @BLUEFROG

You’re welcome :slight_smile: