Spotlight and Hotkeys

I've defined some hotkeys-triggered macros to control stuff in the Finder.app.

However, these hotkeys are not disabled when I use Spotlight quick search , making it unusable.
I've noticed that Spotlight does not switch app context, which could explain a lot.
Would there be a trick hidden somewhere to go over that ?

Hey @wleo,

You'd need to provide an example that shows exactly why these are unusable, for us to be able to suggest possible workarounds.

Right.

LaunchBar used to have its own application-context, and back about v5.0 they made it contextless much to my fury. I had many, many macros that depended upon that context and lost a great deal of functionality.

it depends upon what you're doing.

-Chris

Hi Chris,

Thanks for answer.
Here is an example to illustrate the problem
I and R are defined as hotkeys in a Finder-bounded macro. no modifiers.
Calling Spotlight. Typing "fire" to launch Firefox in the Finder context. Spotlight comes out with "feedback assistant" instead of Firefox because the I and R keys were caught by KM.

The only workaround i found yet is to switch to another app context before using Spolight.

My English is not quite as good @wleo, but if I understand it correctly, you would have to put the macros used for the Finder with the Typed String Triggers into a macro group that is only activated for the Finder.

Here is an example with the Bear App:

With the Typed String Trigger "jj" my palette appears in the Bear App. I switch to the Finder when entering "jj" nothing happens.

2018_11_29%20Support%20

Hi appleianer,

Thanks for the detailed example.

However this wont fix it.
Actually my problem only occurs when using Spotlight in a Finder with some KM hotkeys activated
I guess You can easily reproduce it in your context.
1 - open "Bear". Bear is now the active application.
2- Now try looking for a -fictional- application named jjoopps using Spotlight
See the problem ? [ Hint: Spotlight will only ever gets "oopps" ]

1 Like

Hey @wleo,

Single key hotkeys are nearly always going to be problematic, because there is no way to alter the way they work in a specific context – and this gets in the way of typing normal text.

The way I normally work around this issue is to toggle the activation of my single-key palettes ON only when I'm using them.

Example

I have a visible palette, so I've got a visual cue that single-key-mode is active. When I don't do that I nearly always get bitten.

I usually toggle the single-key-mode palette on/off with the F1 keystroke, because it's a really easy reach for me.

-Chris

Please excuse the misunderstanding @wleo.
You're right, leg using Spotlight I have the same problem.
I don't use Spotlight itself, but Launchbar 6. This problem doesn't occur there. If I work there with my trigger "jj", the palette of the Bear app doesn't appear.

Just for information, I call the Lautbar search field with the Typed String Trigger "jh".

2018_11_30%20Support%20

I have the same issue. When Mail is the active window, I assign the delete key to send mail to trash when the active window name is junk, otherwise the delete functions as an archive command for the message. Like you, when using Spotlight Search on top of mail, the delete key does not work properly.

Did you, or anyone else, figure a solution?

Thanks in advance.

Hey @CurtS,

No, and no one will for some time to come (if ever), because Apple does NOT provide an API to detect and control all possible contexts where the user has focus.

I'm interested to see in the Catalina demo voice commands for things like "move to next field", and I'm hopeful some of that trickles into the 3rd-Party Mac-Automation space.

-Chris

Thanks for the explanation, Chris…makes sense.

1 Like