Bug 379461 - Enter keypress ignored if too soon
Summary: Enter keypress ignored if too soon
Status: RESOLVED NOT A BUG
Alias: None
Product: krunner
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.9.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-03 00:24 UTC by pbs3141
Modified: 2020-07-08 14:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pbs3141 2017-05-03 00:24:21 UTC
I trigger this bug surprisingly often.

Steps to reproduce:
  - Press Alt+F2.
  - Type the first few letters of a program's name and hit enter, all done extremely quickly (say, less than 100 ms).

Expected results:
    Program launches same as if I had typed it slowly.

Actual results:
    krunner remains open and does nothing.
    Enter keypress gets ignored because the completion didn't appear in time.

Proposed solution:
    Record a timestamp whenever the enter key is pressed on no suggestions. When a suitably good match to the search string is later found, if enter was pressed less than 200 ms ago then pretend enter had just been pressed.
Comment 1 Alexander Lohnau 2020-07-08 14:11:51 UTC
This is just because the runner results take a little bit of time to appear.

KRunner should now show up faster anyway: BUG 416145 and if that is not good enough you can disable some plugin.
Don't forget to restart KRunner, see also BUG 421426.

Emitting the key-press later seems kinda weird, especially considering that we would run a match which the user hasn't seen.