Skip to content

Why are modifiers fields deprecated? #1824

@LukasKalbertodt

Description

@LukasKalbertodt

For example KeyboardInput::modifiers is deprecated as:

Deprecated in favor of WindowEvent::ModifiersChanged

However, the docs still say:

Modifier keys active at the time of this input.

This is tracked internally to avoid tracking errors arising from modifier key state changes when events from this device are not being delivered to the application, e.g. due to keyboard focus being elsewhere.

Which sounds like a good argument to let winit track the modifier keys internally. So I'm a bit confused. Is it actually planned to remove the internal tracking of modifier keys? Can applications now reliably track those modifier keys with WindowEvent::ModifiersChanged? Even if I could reliable track modifiers myself, the modifiers field sure is very convenient.

The deprecation was added in #1344

Metadata

Metadata

Assignees

No one assigned

    Labels

    F - questionThere's no such thing as a stupid one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions