Open SamStuckey opened 6 months ago
Same. Also this mentioned: https://github.com/pqrs-org/Karabiner-Elements/issues/1428 and https://github.com/pqrs-org/Karabiner-Elements/issues/1982
I managed to mitigate this problem in a following way:
Cmd+space
to set mode-spotlight
varEsc
with mode-spotlight: on
to a) deactivate var b) send 2X Esc
Enter
with mode-spotlight: on
to a) deactivate var b) send Enter
Which basically keeps spotlight state in that mode-spotlight
var.
That overall works for me. Problem is 2x Esc
as one escape may be not enough to close spotlight with results (it resets instead), but... var tracking is lost. So, sending 2x Esc
to close spotlight always fully (not a big deal).
When it very rarely does not work, I just have to click more escapes to clean everything.
My use case is a bit different - I want to leave vim mode in one app, and make hjkl back to normal in spotlight. But I guess overall approach to your case may be same.
Some snippet if it may help:
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.tinyspeck\\.slackmacgap$"
],
"type": "frontmost_application_if"
},
{
"name": "slack-vi-mode",
"type": "variable_if",
"value": true
},
{
"name": "slack-vi-mode-spotlight",
"type": "variable_unless",
"value": true
}
],
"from": {
"key_code": "spacebar",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"set_variable": {
"name": "slack-vi-mode-spotlight",
"value": true
}
},
{
"key_code": "spacebar",
"modifiers": [
"command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.tinyspeck\\.slackmacgap$"
],
"type": "frontmost_application_if"
},
{
"name": "slack-vi-mode",
"type": "variable_if",
"value": true
},
{
"name": "slack-vi-mode-spotlight",
"type": "variable_if",
"value": true
}
],
"from": {
"key_code": "escape"
},
"to": [
{
"set_variable": {
"name": "slack-vi-mode-spotlight",
"value": false
}
},
{
"key_code": "escape"
},
{
"key_code": "escape"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.tinyspeck\\.slackmacgap$"
],
"type": "frontmost_application_if"
},
{
"name": "slack-vi-mode",
"type": "variable_if",
"value": true
},
{
"name": "slack-vi-mode-spotlight",
"type": "variable_if",
"value": true
}
],
"from": {
"key_code": "return_or_enter"
},
"to": [
{
"set_variable": {
"name": "slack-vi-mode-spotlight",
"value": false
}
},
{
"key_code": "return_or_enter"
}
],
"type": "basic"
},
Description
Examples
Showing EventViewer not responding to Spotlight
Showing EventViewer tracking Finder as frontmost application before opening spotlight
Showing Event Viewer still tracking Finder as frontmost application with spotlight open again
To Reproduce
My Goal
I want to map
ctrl+n
andctrl+p
to my up and down arrows inside of spotlight. So far the best I've come up with is a global mapping with an exception for my terminal programs (Already using those shortcuts for VIM stuff). This works most of the time, unless I open spotlight on top of a terminal window. Terminal (Iterm2, actually) stays active as my frontmost application, disabling my up / down keying within spotlight.My current config to accomplish this goal
Again, this works unless I try and use the spotlight search on top of a terminal window (which I do often)
Ideal Outcome