#events #pointers #input #ui #graphical-user-interface #graphics

no-std ui-events

A crate for working with UI events and input types

2 unstable releases

new 0.1.0 May 8, 2025
0.0.1 May 1, 2025

#188 in GUI

Download history 119/week @ 2025-04-30

119 downloads per month
Used in ui-events-winit

Apache-2.0 OR MIT

75KB
1K SLoC

UI Events

A library for working with UI events and input types.

Linebender Zulip, #general channel dependency status Apache 2.0 or MIT license. Build status Crates.io Docs

A cross-platform input event abstraction modeled after W3C UI Events specifications.

Provides common vocabulary types for working with pointer events (mouse, touch, pen) and keyboard events in a platform-agnostic way. The crate aims to closely follow W3C standards while remaining practical for native application development.

Includes support for:

  • Pointer events (down/move/up, pressure, tilt, etc.)
  • Keyboard events (key codes, modifiers, location)

For integration with winit, use the companion ui-events-winit adapter crate.

Features

  • std (enabled by default): Use the Rust standard library.

Minimum supported Rust Version (MSRV)

This version of UI Events has been verified to compile with Rust 1.73 and later. The no_std build of this library needs Rust 1.81 and later.

Future versions of UI Events might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases.

Click here if compiling fails.

As time has passed, some of UI Events' dependencies could have released versions with a higher Rust requirement. If you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.

# Use the problematic dependency's name and version
cargo update -p package_name --precise 0.1.1

Community

Linebender Zulip

Discussion of UI Events development happens in the Linebender Zulip, specifically the #general channel. All public content can be read without logging in.

License

Licensed under either of

at your option.

Contribution

Contributions are welcome by pull request. The Rust code of conduct applies. Please feel free to add your name to the AUTHORS file in any substantive pull request.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Dependencies

~280–440KB