Skip to content

How do I read from the clipboard? #1995

Discussion options

You must be logged in to vote

I figured it out, I needed to create a "paste done" message..:

  Message::Paste => {
    return iced::clipboard::read::<Message>(|optional_data| {
      if let Some(data) = optional_data {
        println!("{}", data);
      }
      Message::Done
    });
  },
  Message::Done => (),

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by veniamin-ilmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant