Bug 65877 - [usability] Pressing tab for text completion not acting as expected
Summary: [usability] Pressing tab for text completion not acting as expected
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-11 18:42 UTC by Sean Lynch
Modified: 2009-02-03 19:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Lynch 2003-10-11 18:42:21 UTC
Version:           unknown (using KDE 3.1.92 (CVS >= 20031007), compiled sources)
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.6.0-test6

While navigating in the location bar with text completion, pressing tab does not then show the items in the next directory that was just completed.  To do so, you have to backspace the / on the end, then type it back.  It would be nice if pressing tab to complete would then show the drop down of completable dir/files in the next directory.  

If the wording didn't make alot of sense, try this.  In the location bar, type /hom and hit tab.  It will complete /home/ .  Now backspace once to remore the / and type it back.  Now you can see all the listings in /home/ below.  BTW, I am using the dropdown text completion method.
Comment 1 Thiago Macieira 2003-10-11 22:01:00 UTC
This is an usability enhancement, but I don't know if it should be marked wishlist. In any 
event, I can confirm this and I agree with you. 
Comment 2 Sean Lynch 2003-12-14 00:57:50 UTC
A recommendation I have for this is to not add the / at the end when you press tab.  That way you just have to type / to get the contents of the next directory, instead of backspacing the character and then pressing tab.
Comment 3 Sean Lynch 2005-01-25 05:44:06 UTC
Anyone take a look at this by chance?
Comment 4 lexual 2005-04-18 07:37:14 UTC
What happens with two directories which have the have the first few letters the same, e.g. ~/Documents, ~/Desktop.

type ~/D in locationbar and given options:
~/Documents
~/Desktop
http://www.~/D

If the feature was implemented as suggested above, hitting tab once would give you all of ~/Documents sub-folders. But what happens if I want to go to ~/Desktop? I go to hit tab twice, but after the 1st hit, I'm locked into the ~/Documents stuff.

I'm not saying that the idea above shouldn't be implemented, but it needs to be thought through with a little care.

Perhaps we need need a way to confirm that you want to expand what is selected but not actual go to that folder: e.g. tab goes between options, enter takes you to the current selection, what we need is a way to confirm the current selection but not to go to that folder, but to expand the dropdown list for that option.

I hope that made some kind of sense.

Comment 5 Sean Lynch 2005-04-18 13:02:27 UTC
I think taking off the / on the options would allow for this.

'Tab' would take you between options and '/' would take you to the sub folders of the highlighted option.
Comment 6 lexual 2005-04-18 16:54:42 UTC
That sounds very reasonable. I agree.
Comment 7 klaatu 2008-05-05 00:55:02 UTC
Still occurs in both 3.5.7 and 4.0.3
Comment 8 David Faure 2008-05-05 20:47:16 UTC
Another solution would be for <Tab> to select the first item and show its subfolders, while you can choose between ~/Documents and ~/Desktop by using the Down and Up keys. Right now Tab and Shift+Tab do the same as Down and Up, which is not terribly useful, I have started a change that would make Tab complete for real using the first item... but I'm open for input.
Especially since this will also affect website URLs in konqueror, which don't have any notion of subdir; <tab> would simply select the first item... I guess that's fine.
Comment 9 David Faure 2008-05-05 23:44:34 UTC
SVN commit 804409 by dfaure:

Never too late to implement usability suggestions from 2003 :)
Pressing <tab> in konq's location bar is now much more useful: it completes
the current path using the first (or current) item from the completionbox, and
immediately offers the new completions (e.g. subdirs) again.

Other users of KLineEdit+KCompletionBox are not affected by default, since
KCompletionBox still handles Tab/Shift+Tab as Down/Up by default [even though
the apidox said this was off by default].

BUG: 65877


 M  +3 -1      kdebase/apps/konqueror/src/konqcombo.cpp  
 M  +5 -4      kdelibs/kdeui/widgets/kcompletionbox.h  
 M  +25 -8     kdelibs/kdeui/widgets/klineedit.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=804409
Comment 10 David Faure 2008-05-05 23:54:09 UTC
Note that I solved the "~/Documents and ~/Desktop" problem differently: you type ~/D, both appear, if you want Desktop you just press the Down key, and then Tab will select it and offer the contents of the Desktop/ folder. Gives a nice and fast keyboard-based completion overall -- thanks for this report.
Comment 11 David Faure 2009-02-03 19:12:25 UTC
SVN commit 920743 by dfaure:

Better fix for 65877, which doesn't require disabling "Tab means Down" in the completion box (#167135 says some people like that :-).
I think I found a solution that makes everyone happy: if there's only one entry then Tab autoselects the first entry
and completes again, allowing to use it like a shell for local files:  /hom<tab>dfau<tab>Docu<tab> for /home/dfaure/Documents.
If there's more than one entry, then Tab does "Down" as before.
CCBUG: 65877, 167135


 M  +124 -120  kcompletionbox.cpp  
 M  +0 -1      kcompletionbox.h  
 M  +8 -22     klineedit.cpp  
 M  +10 -1     klineedit.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=920743