pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful tool for customizing keyboards on macOS
https://karabiner-elements.pqrs.org/
The Unlicense
18.94k stars 839 forks source link

How to disable a complex rule (for a specific app) when using spotlight search? #2942

Open zhouyc98 opened 2 years ago

zhouyc98 commented 2 years ago

I'm using a Karabiner-Element rule (like https://ke-complex-modifications.pqrs.org/#finder_improved_navigation) to improve the Finder, such as mapping Backspace (DeleteBackward) to "Cmd-[" to go to the previous folder. I made it by using complex rules and bundle_identifiers (^com.apple.finder) and set_variables (set a variable of onEdit to indicate I'm renaming file to exclude the rule).
However, I found that when Finder is the frontmost app and I press Cmd-Space to launch the spotlight search, the rule will also be enabled because Finder is still the frontmost app, which cause me cannot use Backspace to delete words. And since Cmd-[ has no meaning for spotlight search, so it has no effect. I want to get rid of this issue to let me delete words normally when using spotlight search, how can I do? Thanks!

honsa commented 2 years ago

There are already open issues about this, seems like there is no solution now

https://github.com/pqrs-org/Karabiner-Elements/issues/1636 https://github.com/pqrs-org/Karabiner-Elements/issues/1982 https://github.com/pqrs-org/Karabiner-Elements/issues/2246

torarnv commented 2 years ago

This is still an issue. Enter for Cmd+O in Finder results in Spotlight not being able to confirm the choice with Enter if Finder is/was the frontmost app.

jopalesha commented 1 year ago

any updates?

JarrettBillingsley commented 6 months ago

Throwing another voice on the pile. I use the modification that remaps Return to open in Finder. If I open Spotlight while Finder is in the foreground, Return can't be used to confirm in Spotlight.

Weirdly enough this same complex modification worked on Monterey, but not Ventura. Something changed?

maliayas commented 1 month ago

See a workaround: https://github.com/pqrs-org/Karabiner-Elements/issues/1982#issuecomment-2395705893