Get the text selected by the cursor
selection = "1.2.0"use selection::get_text;
fn main() {
// Return the selected text on success
// Otherwise return the empty string
let text = get_text();
println!("{}", text);
}- Windows
- MacOS
- Linux
- X11
- Wayland
- Automation API
- Clipboard
- Accessibility API
- Clipboard
- Primary Clipboard
- X11:
x11-clipboard - Wayland:
wl-clipboard
- X11: