bevyengine / bevyengine/bevy

Input combination / modifier keys abstraction

Open
#1,654 7 comments 2 reactions 0 assignees View on GitHub
A-Input C-Feature C-Usability S-Needs-Design-Doc
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Modifier keys are very commonly used in both games and applications. The existing approach to this is very manual, and heavy on boilerplate. See the [cheatbook page](https://bevy-cheatbook.github.io/cookbook/input-handling.html) for a good overview of how to work with input right now.

## What solution would you like?

Expose a first-class solution for modifier keys in bevy_input. I'm not immediately sure what this would look like, so suggestions are very welcome.

## What alternative(s) have you considered?

Use match statements everywhere, repeatedly. Iterate through eventreader (because that says it is in order) and maintain my own modifier key state as a local resource (credit to `@mattdm` on [Discord](https://discord.com/channels/691052431525675048/742884593551802431/820691893318713344).

## Additional context

None.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing input-handling approach described on the linked cheatbook page and the bevy_input module. Determine a first-class modifier-key API that reduces repeated match statements and local state management, then validate the design against common game and application input use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.