Inconsistent behaviour when toggling filter bar from button or shortcut key

I have a quick filter toggle button set as shown:

@ifset:QUICKFILTER Set QUICKFILTERCLEAR @ifset:else Set QUICKFILTER=!prev Set QUICKFILTER

It's also set to use the shortcut key CTRL+F (and nothing else is).

There is some inconsistent behaviour between the button vs. shortcut key, which changes depending on whether the filter bar text box has the focus, or just the filter bar has the focus, or neither have focus.

[ul]
[li] If the filter bar is hidden:
Pressing the button shows it and sets focus to it
As expected

Pressing CTRL+F shows it and sets focus to it
As expected

[/li]
[li] If the filter bar is shown and the filter textbox has focus:
Pressing the button stops the filter taking effect, but the filter is left as it was and the filter bar stays on screen
Not as expected

Pressing CTRL+F does nothing
Not as expected, and different from button press

[/li]
[li] If the filter bar is shown and the filter textbox does not have focus, the filter bar itself does (i.e. by clicking on another control in the filter bar, or the grey background of the bar itself):
Pressing the button changes the filter to 'Enter filter' but the filter bar stays on screen
Not as expected

Pressing CTRL+F changes the filter to 'Enter filter' but the filter bar stays on screen
Not as expected, but same as button press

[/li]
[li] If the filter bar is shown but does not have focus (i.e. having clicked on a lister's background)
Pressing the button hides the filter bar
As expected

Pressing CTRL+F hides the filter bar
As expected[/li][/ul]

Thanks,
T

Hotkeys won't work when the filter bar is active, as the edit control swallows the keys (since they may make the edit control do things).

When the filter bar's edit control has focus, you can simply push Esc (cancel) or Return (apply) to return focus to the file display.

Pushing Esc once more will clear any active filter.

I don't think you need to set up custom hotkeys to toggle the bar.

I understand the CTRL+F being ignored whilst in the text box, but there is also different behaviour if the filter bar (but not text box) is focused vs. if a Lister is.

Also, since you know which shortcut keys will cause actions in the text box (CTRL+C, V etc), can't you pass everything else upwards?

Also, sorry to have a second post, but also the button doesn't work as expected, not just the CTRL+F.

Fundamentally the issue is the filter bar will stay visible for as long as it has focus, and there's no command that will take focus away from it.

Ah ok, that makes sense. Thanks!