Suggestion request for krunner

Jacopo De Simoi wilderkde at
Sat May 30 11:44:01 CEST 2009

Dear devs,

  I've recently made a commit to fix the inconsistent behavior of the TAB key in krunner; unfortunately the fix does not work as we (aseigo and I) expected on paper,
 so I'd like to know if there are suggestions you could provide, so that we can define a behavior before 4.3.0

The setting:
Krunner (with the default interface) offers a handy history completion; as you start typing some letters, the query will be 
automagically completed (in gray) based on your recent queries.

The problem:
There are several ways to accept the suggested (gray) query, for example clicking on the LineEdit, hitting the End key or the right arrow. 
The issue arise when one tries to accept the completion with the TAB key (thinking of krunner as a miniCLI);
Hitting TAB moves focus to the other items in the window (e.g the other matches in the list of results, or buttons in the krunner dialog)
Unfortunately, when a LineEdit loses focus with some autocompleted (gray) text, the text is automatically accepted (it becomes all black) -- /bug or feature?/ --, 
so that krunner starts a new query with the completed string, which may or may not be what the user wanted. 
Users have grown accustomed to both of these behavior and a number of bug reports indeed deal with the ambiguity of TAB completing & moving focus at the same time: 

The current solution (trunk):
If krunner shows no results AND there is some autocompleted text, hitting TAB will autocomplete the text and the lineEdit will not lose focus
In any other circumstance, TAB will move focus without triggering an autocompletion.

The problem with this solution is the "shows no results" part. indeed it's complicated to figure out if the shown results are obsolete and soon to be discarded 
(e.g. type su, the autocompletion suggests suspend, but su is a valid result, so add an 's' and hit TAB (quickly), krunner still shows some old results, so the query
is not completed but then we are left with an empty result scene and "sus" in the lineedit not focused, -argh-)

We might as well make TAB not autocomplete in any case, so to avoid any inconsistency whatsoever, but this might be upsetting many users which already rely
on this "feature".
Before trying some magic tricks to let the current solution work properly (e.g. we might complete only if the scene is hidden), I'd like to ask if there are any 
comments or suggestions for new solutions.


More information about the Plasma-devel mailing list