emilk / emilk/egui

examples/keyboard_events Holding A and left clicking Clear button generates both Pressed and Held text

Open
#2,800 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Describe the bug**

**To Reproduce**
Steps to reproduce the behavior:
1. `cd tmp && git clone https://github.com/emilk/egui.git`
2. `cd egui`
3. `cargo run -p keyboard_events`
4. now hold `A` key and then left click on the `Clear` button once.
5. keep holding `A` key and left click on `Clear` as many times as you want.

**Expected behavior**

only `Held` should be seen after doing step 4 or 5.

**Screenshots**

![pressedheld_screen-2023-03-10-12-09-14](https://user-images.githubusercontent.com/106607441/224301112-2d120ea0-870e-4d28-a193-aaf3dbb4a98f.jpg)

**Desktop (please complete the following information):**
- OS: Gentoo Linux x64
- Browser n/a
- Version 2.13

**Smartphone (please complete the following information):**
- Device: n/a
- OS:
- Browser
- Version

**Additional context**

X.Org X Server 1.21.1.7

Contributor guide

Open the contributing guide

Research direction

Run `cargo run -p keyboard_events` and reproduce the behavior by holding A while clicking Clear. Trace the keyboard and button event handling used by the `examples/keyboard_events` package, verify the issue against the latest master, and consider it done when repeated clicks while A is held show only `Held`.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.