Prevent backspace from closing Listary window

Sometimes I want to delete few letters from Listary search field so I hold backspace for a while. If I hold for too long, it will result in closing Listary window and - what is worse - changing current folder I’m viewing.

I think it would be better if backspace didn’t close Listary window.

Consider pressing ESC and then start over again?

It seems to be more intuitive to just press backspace than ESC, then Win+S (you need to use more fingers to do so).
The only problem is when you press backspace one too many time or hold it too long.

But this is what I will try to do now.

If you’re using Directory Opus, Win + S is not required in the new beta. I still prefer ESC.

I am using AutoHotkey to change this behavior of Listary. If anyone is interested, this the code I use:


#NoEnv  
SendMode Input  
SetTitleMatchMode RegEx

#IfWinActive ahk_class CabinetWClass                ;Explorer
    BackSpace:: ; Backspace pressed while Explorer Window active

        ; Change the non intuitive Listary Backspace behavior 
        ; (going back in Explorer history instead of deleting last typed character)
    
        ; WinGet, listary_id, ID, ahk_class Listary_WidgetWin    ; List and searchbox are two different windows. This proves to be the id handle of listary list window (we don't need that)

        WinGet, listary_id_last, IDLast, ahk_class Listary_WidgetWin ; Get the id handle of listary searchbox window
        
        if listary_id_last { ; Listary is active in the Explorer window
            ControlGetText, listary_text, , ahk_id %listary_id_last%  ; Get contents of the search field
         ;   ToolTip, Listary is active: `nSearchBox id: "%listary_id_last%" `nSearchbox contained "%listary_text%" when key was pressed. ; You can uncomment this line for debugging purposes.
            if (listary_text != "Search") { ; do not allow Backspace to exit Listary when the SearchBox is empty (contains "Search" - varies with language)
                ; but do send a Backspace key to the searchbox to delete the last typed character if it is not empty
                ControlSend, ListarySearchBox1, {BackSpace}, ahk_id %listary_id_last%
            }
        } else { ; Listary not active in Explorer window, send the Backspace key to be handled by Explorer.
            ; ToolTip, Listary is not active
            Send, {Backspace}
        }
        return

#IfWinActive ahk_class ahk_class Listary_WidgetWin     ; Listary
    BackSpace:: 
        WinGet, listary_id_last, IDLast, ahk_class Listary_WidgetWin ; Get the id handle of listary searchbox window

        if listary_id_last { 
            ControlGetText, listary_text, , ahk_id %listary_id_last%  ; Get contents of the search field
            if (listary_text != "Search") { ; do not allow Backspace to exit Listary when the SearchBox contains "Search" , varies with language.  Initially this field is blank, so you can exit with backspace if no letters at all have been typed yed.
                ; but do send a Backspace key to the searchbox to delete the last typed character if it is not empty
                ControlSend, ListarySearchBox1, {BackSpace}, ahk_id %listary_id_last%
            }
        }
        Return





Edit 22-7-2013: using Regex for title match mode

1 Like

I registered just to backup this request. I can’t stress enough how many times I accidentally closed the search window while trying multiple short search query variations.

Please add at least an option (like a checkbox or something) to allow preventing backspace from closing the search window when it’s empty (cursor reaches the left boundary). I’ve been using Listary since it first came out, was probably among the first people to back it up by licensing the Pro version since it literally skyrocketed my productivity by enforcing keyboard-only approach. But this small usability issue is something that really drives me crazy from time to time. Please. Pretty please.

After some consideration and testing, I’ve just changed the behavior of backspace as you described. Now it won’t close Listary toolbar.

P.S. Thank you very much for your support!

i m in great need of this feature!!
is it included in Version 5.00.2320?

Not in 2320. Then new version will be released very soon.

Thank you Channing! I already released all the kittens I intended to drown because of this. Kittens are thankful too.

:smile_cat: