get-selected-text 0.1.6

A tiny Rust library that allows you to easily obtain selected text across all platforms (macOS, Windows, Linux)
Documentation
1
2
3
4
5
6
use enigo::*;

pub fn get_selected_text() -> Result<String, Box<dyn std::error::Error>> {
    let mut enigo = Enigo::new(&Settings::default()).unwrap();
    crate::utils::get_selected_text_by_clipboard(&mut enigo, false)
}