aiekick / ImGuiFileDialog

Full featured file Dialog for Dear ImGui
MIT License
1.25k stars 202 forks source link

[Key Exploration] Allow to select a file from the displayed list by pressing keys with delay for have more chars than just the first #183

Open MBilderbeek opened 6 months ago

MBilderbeek commented 6 months ago

As the title says. We're using this in the openMSX project and got some feedback from users. This is one of the issues: it would be easier to find files if you could just start typing file names (currently it only matches the first character and directly selects the first match... but you probably want to refine the match by typing one or two characters more).

Suggestion: behaviour as now, but add a little extra time to allow the user to type more characters to refine the search. So if a user types a character after a first character within 1 second, use it to match these series of 2 characters to find a file in the current list and (pre-)select that one instead of the first match with only one character. If then again, within 1 second another character is typed, use it again to refine the match, and so on. I think it also works in many native file browsers like that and is hopefully not that hard to implement (I implemented it in a different framework myself).

aiekick commented 5 months ago

when i was doing the key exploration mode, i ask to myself about this feature. and realize, its too more efforts for nothing too usefull. maybe im wrong if other people want it. will think about it

aiekick commented 4 months ago

to be sure, since your title is "type a name to find files", you not want to launch a search query on the filesystem by using keys. if this is that its out of IGFD.

What i have in mind, its just to locate a precise name with the key pressed delay on the current displayed file list. (like in windows explorer)

MBilderbeek commented 4 months ago

Yes, I mean the latter. It's about quickly selecting from the entries in the current directory. I thought it was clear from the initial description, but apparently it isn't, sorry about that. It's just a minor extension to the current way of selecting an entry with the keyboard where only the first character typed is taken into account.

aiekick commented 4 months ago

it was maybe clear when you wrote you first issue, but with time i got a doubt :)