bevyengine/bevy
bevy_clipboard
A platform-agnostic clipboard interface, exposed as a Bevy resource.
Purpose
Read and write the system clipboard from systems. The crate wraps arboard (and a Wasm shim for the browser) and surfaces it as a Clipboard resource.
Directory layout
crates/bevy_clipboard/src/
└── lib.rs # Single file. ClipboardPlugin + Clipboard resource.Key abstractions
| Type | File | Description |
|---|---|---|
ClipboardPlugin |
crates/bevy_clipboard/src/lib.rs |
Adds the Clipboard resource. |
Clipboard |
crates/bevy_clipboard/src/lib.rs |
Resource: read() / write(text). |
How it works
On native platforms Clipboard wraps an arboard::Clipboard lazily on first access. On Wasm it goes through the browser's async clipboard API (only string content is supported, and browser permissions can reject reads).
For OS-integrated clipboard support (e.g. drag-and-drop, image data), look at the system_clipboard cargo feature gating in bevy_winit.
Integration points
- Depends on:
arboard,bevy_app,bevy_ecs. - Depended on by:
bevy_internal,bevy_ui/bevy_text(for paste).
Entry points for modification
- The crate is a single file. Image support and richer drag-and-drop hooks belong in
bevy_winit.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.