Listening for input box with the cursor without using onfocus

I’m using a function key for a trigger instead of a button connected to an onfocus event…

What method targets the id of the input box that has the cursor in it? Is this even possible?

You can use document.activeElement to gain a reference to the input field at has the cursor.