Skip to content

Input combination / modifier keys abstraction #1654

@alice-i-cecile

Description

@alice-i-cecile

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

Additional context

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreC-FeatureA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useS-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be merged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions