After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 42203 - Keyboard shortcuts and autocompletions
Keyboard shortcuts and autocompletions
Status: RESOLVED DUPLICATE of bug 679900
Product: nautilus
Classification: Core
Component: Views: All
unspecified
Other Linux
: Normal enhancement
: future
Assigned To: Nautilus Maintainers
Nautilus Maintainers
AP3
Depends on:
Blocks:
 
 
Reported: 2000-08-17 13:48 UTC by bmh_ca
Modified: 2012-08-14 01:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description bmh_ca 2001-09-10 00:37:49 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.

Comment 1 John Fleck 2002-01-05 04:11:11 UTC
Changing to "old" target milestone for all bugs laying around with no milestone set.
Comment 2 Christian Fredrik Kalager Schaller 2002-05-07 12:08:08 UTC
Changing to enhancement type bug and marking it as milestone future. 
Comment 3 Calum Benson 2003-06-25 23:12:36 UTC
Marking AP3 to reflect a11y team's assessment of a11y impact-- any
future implementation of this idea would need careful keynav
consideration.
Comment 4 Calum Benson 2003-08-07 16:09:05 UTC
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME
bug list :)
Comment 5 Brian "netdragon" Bober 2004-04-14 02:14:38 UTC
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.
Comment 6 Brian "netdragon" Bober 2004-04-14 02:20:11 UTC
See also bug 136814
Comment 7 Calum Benson 2004-10-21 16:50:39 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 8 Stephen Pike 2005-06-26 14:41:29 UTC
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! 
Comment 9 Calum Benson 2006-04-26 17:15:08 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 10 William Jon McCann 2012-08-14 01:02:25 UTC

*** This bug has been marked as a duplicate of bug 679900 ***