Skip to content

Create InputEvent rom InputEventKind #50

@Yamakaky

Description

@Yamakaky

In addition of the current constructors, a new constructor could be added:

fn from_kind(kind: impl Into<InputEventKind>, value);

impl From<Key> for InputEventKind {}
impl From<AbsoluteAxisType> for InputEventKind {}
...

InputEvent::from_kind(Key::BTN_A, 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions