GNOME Bugzilla – Bug 42203
Keyboard shortcuts and autocompletions
Last modified: 2012-08-14 01:02:25 UTC
Hi there, When using a "good" file manager, I would expect that whenever I type any valid file-character, that it would reduce the list of files at the top. Take, for example, this scenario File0 File1 aFile0 aFile1 bFile0 bFile1 If I type "b" then immediately b* = {bFile0, bFile1} should be at the top of my list (and perhaps segregated from the other files by a visual separation) so I have to do a minimum amount of keystrokes to navigate to them with the keypad. In circumstances as follows: aFile123x aFile123y aFile123z When I type "y" then aFile123y* (just aFile123y here) should move to the top and be selected. One can cleverly combine these two by allowing combinations of valid filename characters and the tab "autocompletion" key. In the foremost example, a[tab] would bring up the short-list aFile0 aFile1 and hitting "0" or "1" would select that file. The even faster alternative (from the user's perspective) would be to have the [Tab] unnecessary and the autocompletion immediate, and a backspace wipe all the unioned (ie. common) text for all files currently selected. So typing "a" would bring up aFile* and hitting 1 or 0 would select the appropriate file. Hitting backspace would wipe the line and remove all selections. To make it clearer: aaFile0 aaFile1 abFile0 abFile1 Entering "a" selects everything here. Hitting "a" again gives: aaFile* with autocompletions 1 and 0. Hitting backspace would go back to selecting "a*" Anyway, if that's totally unclear, let me know. I'd love to expand/help! :) ------- Additional Comments From darin@bentspoon.com 2000-08-17 15:18:51 ---- This is an interesting feature idea. The description of it isn't perfectly clear and the details aren't worked out. But the idea is definitely new and unprecedented. It clashes with our current use of the keyboard for selection, but we might want to come back to this idea some day. ------- Additional Comments From bmh_ca@yahoo.com 2000-08-17 18:49:02 ---- Let me elaborate with code. The closer I can bring it to implementation, the easier I think it'll be for you guys to buy it. :-) I'll be brief (I'm trying to get through Lord of the Rings ...) Notes: object oriented design (easier to understand), these aren't real objects, at least insofar as I know, but they should provide you with enough information to implement reasonably. -------------- // storage of all the filenames class oFile { // + associated file "crap" :) // these really want accessors/mutators so you can have elegant inheritance. char * names; // names of the files. char * count; // number of files. void add() { ... // add a new filename to the list } } oFile getCommandFiles(oFile directory, char *currentCommand, char keypress) { /// // ok, I'll admit to some bad assumptions, like no unicode, pointers to // arrays, and a null delimited currentCommand, but please bear with me. //// // oFile directory contains any list of names; 'dir' is a misnomer in virtual // file systems, but again, please patronize so we can examine the real // contextual stuff (off the top of my head, though ... ) if (keypress == backspace) { // for backspace, you really need the full subset of the directory // ** you can do some real elegant (ie. smart) caching of prior directory // lists, but it can be tricky return dwdropBackToLastCommandFiles(directory, currentComamnd); } if (isvalidfilenamecharacter(keypress)) { // for inserts, you only need the prior selection list. // // isvalidfilenamecharacter clear? :) /// // why modularize this? it'll come in handy in other areas. return calculateList(directory, strcat(currentCommand,keypress) ); } return null; } oFile dropBackToLastCommandFiles(char directory, char *currentCommand) { // this is the slow way to do this. also bear in mind that I've // been javaized so my pointer arithematic might leave something to // be desired char *cCptr = currentCommand; oFile oCurrentptr, oPriorptr; while ( (oCurrentptr = increaseListSize(directory, *++cCptr)) != null) { // oPriorptr should end up being the one immediately before // the "oCurrentptr", which was the original selection list // prior to the backspace. oPriorptr = oCurrentptr; } return dBTLCFptr; } oFile increaseListSize(oFile directory, char *newCommand) { //assume a start from scratch. This is (a.) safest and (b.) slowest // but this is an example. If it's all in memory, then this is a non issue // in the (albeit likely) case that this is read from disk, it's a whole // different scenario for performance on large directories... // this would really desire to be threaded. (or the dreaded no-ui-response) int i; int cmdLength = strlen(newCommand); oFile newList = new oFile(); for (char *ptr = newCommand; *ptr != null; *ptr++) { for (i = 0; i < directory.count; i++) { // check short circuit if (strlen(directory.name[i]) >= cmdLength) { if ( strncmpi(directory.name[i], newCommand, cmdLength) == 0 ) { // this is simplistic; sorry to say I haven't seen the // code yet, so I don't know/understand your dir. structs. newList.add(directory.name[i]); } } } } // n^2 complexity. Not too bad, if it's in memory ... return newList.size == 0 ? null : newList; } ------------------- That's it. Is that easier to digest than my ever so useful examples? :-) (ps. I would've made an attachment if (a.) I was confident Mozilla would let me and (b.) this worked with existing code.) ------- Additional Comments From bmh_ca@yahoo.com 2000-08-17 18:51:58 ---- Oh dear... :) addendum: increaseListSize = calculateList ------- Additional Comments From eli@eazel.com 2000-10-16 19:46:16 ---- Batch-assigning QA ownership of remaining bugs to eli@eazel.com ------- Additional Comments From eli@eazel.com 2001-02-21 11:16:35 ---- QA Assigning to brett. Sorry for the spam. ------- Additional Comments From eli@eazel.com 2001-03-26 11:13:25 ---- QA Assigning to self. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 20:37 ------- The original reporter (bmh_ca@yahoo.com) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org.
Changing to "old" target milestone for all bugs laying around with no milestone set.
Changing to enhancement type bug and marking it as milestone future.
Marking AP3 to reflect a11y team's assessment of a11y impact-- any future implementation of this idea would need careful keynav consideration.
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME bug list :)
I've thought about your idea, and I was wondering how you could do like you could on Windows Explorer where if you don't have the files sorted, that you can press f so many times and that takes you through the files with f as the first character, but I realized that your method would be more efficient because they'd all be shown at once. By the way, your idea is a similiar behavior to the autocomplete on Mozilla. I have some suggestions for your idea: 1) Escape clears the entire selection. 2) This can be used in conjunction with a location bar (I don't see any location bar on Gnome 2.6 for Fedora 2 test 2 for some reason) so that if you start typing a filename in the location bar, it'll do a similiar thing. 3) Put the chosen files in a seperate frame (perhaps sidebar) with its own scrollbar in the same window, not the same list because people might want to see all the files around the letter a, not just files starting with the letters a. Then highlight the files that start with that letter in the original frame, and scroll that frame to the location of the files. Pressing the close button on that frame or sidebar is the same as hitting escape. 5) Have it accompanied by a sound so people know what's going on.
See also bug 136814
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs. Filter on "SUN A11Y SPAM" to ignore.
Yes this is a much needed feature, or something similar to MS Explorer- It is rather annoying that at the moment if you have Directories and Files with the same first letter (say, Dir= Python File= Potatoes.db), even if you have a file selected, it will jump to the Directory if you press P, not to the file! This is reaaaaly annoying for those of us who dont like mice :) I guess this is all covered in the above, but this simpler implementation would be as welcome as your rather more complete version!
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
*** This bug has been marked as a duplicate of bug 679900 ***