Flow-Launcher / Flow-Launcher/Flow.Launcher

BUG: Keystrokes interpreted out of order

Open
#2,925 4 comments 0 reactions 0 assignees View on GitHub
bug keep-fresh Needs investigation
Dominant language
C#
Stars
15.6k
Forks
644
Avg merge
16h 51m
Merged PRs (30d)
3

Description

### Checks

- [X] I have checked that this issue has not already been reported.

- [X] I am using the latest version of Flow Launcher.

### 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.

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.