bevy/crates/bevy_input/src
daxpedda e7271709b2
Expose Winit's KeyEvent::repeat in KeyboardInput (#14161)
# Objective

I would like to know if an event was emitted because of "key repeats" or
not.
Winit already exposes this information, but it isn't sent along by Bevy,
which this PR intends to address.

## Solution

Expose
[`winit::event::KeyEvent::repeat`](https://docs.rs/winit/0.30.3/winit/event/struct.KeyEvent.html#structfield.repeat)
in
[`bevy::input:⌨️:KeyboardInput`](https://docs.rs/bevy/0.14.0/bevy/input/keyboard/struct.KeyboardInput.html).

## Testing

Just hold any regular key down and only the first event should have
`KeyboardInput::repeat` set to `false`. Most OSs have "key repeat"
enabled by default.

---

## Changelog

- Added `KeyboardInput::repeat` signifying if this event was sent in
response to a "key repeat" event or not.
2024-07-15 14:52:33 +00:00
..
axis.rs Improve doc formatting. (#9840) 2023-09-18 19:43:56 +00:00
button_input.rs bevy_input: allow use without bevy_reflect (#14167) 2024-07-08 01:09:07 +00:00
common_conditions.rs Fix cyclic dep (#11523) 2024-01-25 17:44:32 +00:00
gamepad.rs bevy_input: allow use without bevy_reflect (#14167) 2024-07-08 01:09:07 +00:00
gestures.rs bevy_input: allow use without bevy_reflect (#14167) 2024-07-08 01:09:07 +00:00
keyboard.rs Expose Winit's KeyEvent::repeat in KeyboardInput (#14161) 2024-07-15 14:52:33 +00:00
lib.rs bevy_input: allow use without bevy_reflect (#14167) 2024-07-08 01:09:07 +00:00
mouse.rs bevy_input: allow use without bevy_reflect (#14167) 2024-07-08 01:09:07 +00:00
touch.rs bevy_input: allow use without bevy_reflect (#14167) 2024-07-08 01:09:07 +00:00