bevy/crates/bevy_winit/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
..
accessibility.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
converters.rs Expose Winit's KeyEvent::repeat in KeyboardInput (#14161) 2024-07-15 14:52:33 +00:00
lib.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
state.rs Dirty fix for App hanging when windows are invisible on WindowsOS (#14155) 2024-07-14 16:47:28 +00:00
system.rs apply window scale to window size when creating it (#13967) 2024-06-21 18:04:57 +00:00
winit_config.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
winit_event.rs flush key_input cache when Bevy loses focus (Adopted) (#13678) 2024-06-05 02:06:47 +00:00
winit_windows.rs Have WindowPosition::Centered take scale_factor_override into account (#13949) 2024-06-24 20:56:46 +00:00