bevyengine / bevyengine/bevy

Swapping keyboard layouts can leave `Key`s pressed after the user has released them.

Open
#25,484 2 comments 0 reactions 0 assignees View on GitHub
A-Input C-Bug S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version and features

`0.19.1`, `main`

## What you did

1. Press any keyboard button.
1. Switch to a keyboard layout where that `KeyCode` maps to a different `Key`.
1. Release the button.

## What went wrong

The `Key` that was originally pressed is never normally released. Due to #25483, it is not even released when the window loses focus.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the three-step sequence in Bevy 0.19.1 or main: press a key, switch to a layout with a different Key mapping, and release it. Trace the keyboard event handling for the original Key and verify that the pressed Key is released after the layout change, including the focus-loss behavior described in #25483.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.