Prioritize toolbar Alt+accelerator keys over keybinds or add contexts to keybinds

Have a suggestion for "Everything"? Please post it here.
eugenesv
Posts: 58
Joined: Fri Mar 04, 2016 7:03 pm

Prioritize toolbar Alt+accelerator keys over keybinds or add contexts to keybinds

Post by eugenesv »

For convenience I've bound Alt+C to toggle global "Search-Match Case" command.
But when I search within the search results ("Edit-Find"), that toolbar also has a "Match &Case" command with C as accelerator, so now there is a conflict.
Since the toolbar is a "more specific" user action, I think that when it's active its accelerator keys should have a higher priority over the global keybinds

Alternatively, you could have an extra "context" field added to shortcuts so that I could bind "Alt+C context:NOT search field active" to global match case and "Alt+C context:search field active" to local match case

(this will nicely match my text editor, where I have a global Alt+C command, but in a search toolbar Alt+C acts on search menu options only, overriding the global command)
void
Developer
Posts: 19899
Joined: Fri Oct 16, 2009 11:31 pm

Re: Prioritize toolbar Alt+accelerator keys over keybinds or add contexts to keybinds

Post by void »

Global keyboard shortcuts will override alt commands.

Please try setting the "Use shortcut in" to "Search Edit":
  • In Everything, from the Tools menu, click Options.
  • Click the Keyboard tab on the left.
  • To the right of Show commands containing, search for:
    case
  • Select
    Search | Match Case
  • Select your Alt + C keyboard shortcut and click
    Edit...
  • Change Use shortcut in to: Search Edit.
  • Click the OK.
  • Click the OK.
I will consider a "NOT findbar" option for "Use shortcut in".
Thank you for the suggestion.
eugenesv
Posts: 58
Joined: Fri Mar 04, 2016 7:03 pm

Re: Prioritize toolbar Alt+accelerator keys over keybinds or add contexts to keybinds

Post by eugenesv »

Alt+C when bottom search edit toolbar is opened already works, so there is no need to limit it, but otherwise additional contexts like in/outside are welcome, thanks!
Could you please make contexts act only when that it is active, i.e., in this case the bottom edit search text input field should be active? Currently it seems to work whenever the bottom toolbar is visible, so still wouldn't be able to use both shortcuts in the same search as one will override the other
void
Developer
Posts: 19899
Joined: Fri Oct 16, 2009 11:31 pm

Re: Prioritize toolbar Alt+accelerator keys over keybinds or add contexts to keybinds

Post by void »

Could you please make contexts act only when that it is active, i.e., in this case the bottom edit search text input field should be active?
I will consider making findbar contexts act only the findbar is active.
Thank you for the suggestion.


Currently it seems to work whenever the bottom toolbar is visible, so still wouldn't be able to use both shortcuts in the same search as one will override the other
keyboard shortcuts set under Tools -> Options -> Keyboard are given priority.
However, if you set the keyboartd shortcut "Use shortcut in", the shortcut key will only work from that control.
Using "Search Edit" means the shortcut key will only work from the main search box (not the findbar search box)
This way you can Set Alt + C to change Match Case from the main search box. Anywhere else, Alt + C will toggle the findbar case.
eugenesv
Posts: 58
Joined: Fri Mar 04, 2016 7:03 pm

Re: Prioritize toolbar Alt+accelerator keys over keybinds or add contexts to keybinds

Post by eugenesv »

Thanks for the detailed explanation, I was testing when the search list was active, but I see that there is already an extra context for that, so I've replaced 1 global with 2 context-specific search edit/result list, and this so far covers what I need! (not that I would be against a single !NOT negation for each context, but adding two shortcuts is also trivial)