cyaoxuan / pe

0 stars 0 forks source link

Need to press `Enter` twice for command to work #7

Open cyaoxuan opened 11 months ago

cyaoxuan commented 11 months ago

When typing commands like list, users have to type the Enter twice due to the autocomplete function, slowing down the user

nus-se-script commented 11 months ago

Team's Response

Agreed, we could instead detect if the autocomplete suggestion is already an exact match to the given command, then immediately run the command.

Although, it is non-trivial to design such a behavior. Our considerations include:

Additionally, JavaFX seems to be really weird in terms of keystroke event captures - even autocomplete itself used a bunch of hacks and inconsistent workarounds from days of trial and error to correctly interpret keyboard events.

See workaround notes at: AutocompleteTextField.java#L103, AutocompleteTextField.java#L109, CommandBox.java#L71

Thus, further polishing of how these keystroke events are distributed (e.g., to debug and correctly pass down the ENTER keystroke to the command box) was thus not really in the scope of being done by v1.4.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: [replace this with your explanation]