Help Creating Condition "In Text Box"

Muscle memory has me always using the End key to get to the end of a line of text, and the Home key to go back to the beginning. I have some key mappings to facilitate these behaviors, but the problem usually comes up when I'm working in a web browser or a slide deck.

In those cases, the End key sends you away from the text box and jumps to the end of the web page or the last slide. Can anyone help me find a way to write a macro that says "If in a text box, go to the end of the line. Else, go to the end of the web page/slide deck"? It might mean re-mapping my existing KM macro away from "Go to last slide," but I still want that dual functionality somehow.

I used to restrict the behaviors to certain apps and live with the consequences, but I figure there's got to be a method I'm missing. Below is the current fix, but if I use PowerPoint or another flavor of slide show, it doesn't work. I can add it as a condition, but Browsers are still an issue. Is there a way to trigger behavior based on whether you're in a text box?

End Key Macro

AFAIK, KM has no way to detect whether or not you cursor is in a text box on a web page.
This could probably be done using Execute a JavaScript in Browser action, but we would need the actual web page to test/develop.

A web page can display a "text box" many different ways, so this could be a challenge to detect across all web pages.

FWIW, on a Mac ⌘← and ⌘→ moves you to the start and end of a line, respectively.
That works everywhere on a Mac, so, IMO, it is a muscle memory worth developing.

1 Like