Attached action highlights the location of the mouse. But I need it to highlight the location of the cursor (in Microsoft Word). Is this possible?
The mouse cursor is different than the blinking text cursor, and there's not an easy way to identify its location (that I've ever seen). However, you can kind of fake it in Word using the "highlight" feature, though you need to assign it a keyboard shortcut first. But if you do that, this macro will highlight the last word before the cursor's location, remain onscreen for 1.5 seconds, then undo the highlight and put the cursor back where it was.
Download Macro(s): Highlight text cursor location.kmmacros (114 KB)
Macro notes
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
System information
- macOS 14.6.1
- Keyboard Maestro v11.0.3
It's not a perfect system, because it can only highlight the word that's closest to the cursor, but maybe that's good enough.
-rob.
Actually, I think there is an easy way. In the Accessibility pane of System Settings, there's a feature that displays a large icon under the flashing text cursor (if there is one) to make it easy (for visually impaired people) to find the cursor. I think it looks like a bright red rectangle, but I haven't used it in years and I can't seem to find that option right now in System Settings. I suspect (but I'm not certain) that one could use a "Find Image" action in Keyboard Maestro to get the cursor location that way, since that red rectangle is not the mouse pointer.
If anyone can find that setting, I would appreciate knowing where it is. I seem to have forgotten how to trigger it, but I'm sure it's still there.
I dug around in Accessibility, and I couldn't find anything that did something like you describe. The closest I got was the Hover Text feature, but that changes the view of text under the pointer, which is not necessarily where the cursor is.
If such a thing exists, I'd love to know about it, too; I just don't recall ever seeing it before, nor could I find it with a bit of digging today.
-rob.
There is no general way on the Mac to find the text insertion point.
There may be a way via AppleScript in some applications. Or possibly by looking at the screen and searching for the blinking cursor.
I'm not sure if I understand the problem correctly and I don't want to talk nonsense. But if it's just about seeing (finding) the cursor in a text. Or right click there to open a menu
Paste an emoji (wherever the cursor is), search for that emoji, move the mouse there, delete the emoji
This works well, I do it every day.
I assure you it does exist. In fact, I got it to appear yesterday, just once, but I didn't notice which setting I had changed to make it appear.
I'm not doubting you, I'm just saying that I didn't find it while exploring Accessibility yesterday. The only other thing I found is that if you make the mouse pointer huge, then the insertion symbol is huge as well, but that only works in some text fields while hovering; as soon as I click to edit, the actual insertion point is the same small vertical line. Terminal lets you set an insertion point style, but that's specific to Terminal.
As noted above, I'd love to know where to find this, as it's come up before.
-rob.
Update:
I asked ChatGPT, and it didn't have an answer. I also found a forum thread on MacRumors which also didn't have an answer. (The MacRumors thread points out that apps are able to adjust their insertion point as a feature, but nobody offered up a system-wide solution.)
So if it is possible, it's not through any obvious method in Accessibility, it seems.
-rob.
I am 90% sure it has something to do with the Voice Control feature of Accessibility. For people who need to control their computer by voice, macOS provides an icon to help them find where the text cursor is.
My recollection is that under some conditions there's a 5 second delay between the time the text cursor starts flashing, and the time when the red box indicator shows up. But under some conditions the red box indicator appears instantly.
Is this to make the insertion point's position more obvious in a sea of text?
Accessibility settings only seem to let you set the colour of the insertion point these days. There used to be utilities that let you make it bigger/bolder, but the tricks I remember used ResEdit so died with OS 9!
Thinking laterally, could you use the Caps Lock indicator as a proxy, drawing your attention to the right area of the screen? If so, and borrowing heavily (stealing!) from this thread, something like the following could help:
Highlight Insertion Point with Caps Lock Icon.kmmacros (22.3 KB)
I'm clueless with JXA so, if it is useful, perhaps one of the JS gurus will be able to step in and put the repeat-with-pause part into the JXA action so it doesn't waste resources repeatedly instantiating the environment.
May I ask what the macro should do? Unfortunately, it doesn't do anything here.
Put the insertion point in a block of text, run the macro by hot key trigger, and it should flash the Caps Lock indicator icon below the insertion point a couple of times:
I think that icon is pretty new, maybe only coming in with Sonoma, so you'll probably need an up to date OS to see anything. But it does work here.
Ah, I still have Ventura
But I've been doing something similar for a long time. Or it's just me and I don't understand what this is about. The cursor is in a text and you can hardly see it
I trigger my macro and I see the red rectangle for a second. Then it disappears again and I know where the cursor is.
No, I think you've got it exactly. That's certainly another way of doing it, as you mentioned a few posts ago. But I find the flashing Caps Lock indicator more obvious (probably my colour blindness), it doesn't cause any text reflow, and works in locked documents and similar.
I see. Flashing would also be no problem. The red “something” (or anything else) could also be inserted and deleted several times in succession. This would create a flashing effect
I actually need it for something else. I search for it (image) and then move the mouse to this position. I don't know any other way to move the mouse to the cursor.