Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
7.7k stars 300 forks source link

BUG: Keystrokes interpreted out of order #2925

Open jmgabbitas opened 3 weeks ago

jmgabbitas commented 3 weeks ago

Checks

Problem Description

About 1-2 times a day, it launches a program/action based on the first couple of keystrokes only, instead of the full 3 or 4 that I typed. When I open Flow again, it has the full 3 or 4 keys I pressed in the most recent query, so I know they got read in, but then the action was seemingly taken halfway through reading in all the characters.

The behavior seems like there's a delay in reading in characters while it searches an index with each individual keystroke (cool, good feature), but then hitting enter immediately stops the index lookups and just processes whatever is highlighted based on the keystrokes processed so far, ignoring whatever keystrokes might be waiting to be read in.

I read on some other issue threads about slowness that it may have to do with images (so the index takes a second to process images, and while that's happening I hit enter so it just goes with whatever is highlighted). I opened a separate issue for the keystroke ordering, rather than focusing on the slowness itself since this feels more like an integrity thing than performance. The ideal fix is to just process keystrokes exactly in the order they're received (in the example Alt > Space > c > d > e > enter), or maybe wait to process the enter key if there are active index lookups happening? That could then result in more slowness, but it would come with better accuracy.

To Reproduce

This is what happened this morning (and this particular scenario is for whatever reason the most common offender):

  1. I type, in succession: "Alt+Space" "cde" "" (this should launch a putty session to our internal dev environment)
  2. Flow disappears and the program mapped as the top result for "cd" launches
  3. I hit "Alt+Space" again and see that "cde" is cached as the most recent search so it clearly read all three keystrokes

Screenshots

No response

Flow Launcher Version

1.18.0

Windows Build Number

10.0.22631.3880

Error Log

```shell Replace this line with the important log contents. ```
jjw24 commented 2 weeks ago

Just to clarify to be more reproducible, are you using a plugin for the putty session or is it a shortcut file?