https://github.com/rust-windowing/keyboard-types
Types to define keyboard related events
https://github.com/rust-windowing/keyboard-types
rust uievents
Last synced: 12 months ago
JSON representation
Types to define keyboard related events
- Host: GitHub
- URL: https://github.com/rust-windowing/keyboard-types
- Owner: rust-windowing
- License: apache-2.0
- Created: 2017-07-27T08:37:42.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2025-06-05T15:22:16.000Z (about 1 year ago)
- Last Synced: 2025-06-15T03:02:12.555Z (about 1 year ago)
- Topics: rust, uievents
- Language: Rust
- Homepage: https://docs.rs/keyboard-types
- Size: 165 KB
- Stars: 65
- Watchers: 5
- Forks: 13
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
Keyboard Types
==============
[](https://github.com/pyfisch/keyboard-types/actions/workflows/ci.yml)
[](https://crates.io/crates/keyboard-types)
[](https://docs.rs/keyboard-types)
Contains types to define keyboard related events.
The naming and conventions follow the UI Events specification
but this crate should be useful for anyone implementing keyboard
input in a cross-platform way.
See also: [UI Events Specification](https://w3c.github.io/uievents/), and in
particular [the section on keyboard events](https://w3c.github.io/uievents/#keys).
Minimum Support Rust Version (MSRV)
-----------------------------------
The minimum supported Rust version is 1.61, or 1.81 if the `"std"` Cargo
feature is disabled. This is not defined by policy, and may change at any time
in a patch release.
Updating Generated Code
-----------------------
The file `src/key.rs` and `src/code.rs` are derived from the two
W3C working drafts
* [UI Events KeyboardEvent key Values](https://w3c.github.io/uievents-key/) and
* [UI Events KeyboardEvent code Values](https://w3c.github.io/uievents-code/)
in the most recent version. A Python 3 script (requires the `requests` and
`beautifulsoup4` libraries) downloads the files and updates the tables.
Manually check if any modifier keys were changed and update the
`src/modifiers.rs` file if necessary.