Make "Character Viewer" be in focus

When I press the shortcut CTRL+CMD+Space to open the Character Viewer, the window is always not-in-focus, so if I want to start typing in the search field, I always have to click the window and then type.

I'm using the Found Image action now followed by a Click Mouse action.
Is there any other way?
In the Activity Monitor I can see this process, which I don't know if it can be used somehow?
com.apple.CharacterPicker.FileService
One thing I noticed though is that this is always there, even after I close the Character Viewer window. The only way to make it go away is to use the Force Quit option (just using Quit doesn't work).
I'm thinking maybe AppleScript would be an option?
I'm just not that good at AS...
Found this, not sure if it's a step closer:

Is there a way to do this other than using Found Image?

image

My preliminary test (using the KM v11 Button action) with Sonoma says that the Character Viewer is not an AppleScript supporting app. (There's a 30% chance I'm wrong.) So it's doubtful.

1 Like

My very basic macro does the trick, but if I was able to do it some other way, to avoid breaking the macro if Apple decides to make changes to the layout, that would be better.
But if AppleScript doesn't affect the Character Viewer, I will have to use the macro as is. If anything, it will show me an error. No big deal.

Thanks for testing.

Would you mind sharing your macro? I've also been annoyed by the fact that I can pull up the character viewer with a button press, but have to take my hand off the keyboard and focus the pane with my mouse even though I'm just going to search for the character with my keyboard anyway.
I know next to nothing about writing apple macros but I sure would love not to have to deal with this anymore.

1 Like

(this is my new account)

Here it is. It's pretty simple. It just clicks above the panel with the favorites in order to activate the window. Now in my case I'm using the dark theme. If it doesn't work for you, maybe you need to take a screenshot similar to mine. I don't know if the screen resolution affects this or not, but hope it helps:

Emojis - Character Picker Macro (v11.0.1)

Emojis - Character Picker.kmmacros (48 KB)

Keyboard Maestro Export

1 Like