bevyengine / bevyengine/bevy

Add a way to detect what input modality (e.g. gamepad, KBM) is used

Open
#17,666 2 comments 1 reaction 0 assignees View on GitHub
A-Input C-Feature D-Modest S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

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

Games commonly display different prompts based on the input mode the player is using.

This information is also useful for analytics (to inform development priorities).

## What solution would you like?

Define an `InputModality` enum, stored in a resource.

In a `PreUpdate` system (as part of `InputPlugin`) each frame, listen to touch, gamepad, KBM etc events, and set the modality based on what is being used.

Maybe make this system toggleable?

## What alternative(s) have you considered?

Reimplement this in every game that needs this, or reimplement this in a downstream crate.

## Additional context

Previously discussed in https://github.com/projectharmonia/bevy_enhanced_input/issues/22, but fundamentally this is bevy_input's problem.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.