Implement copy/cut/paste, only use iced_winit

This commit is contained in:
Jeremy Soller 2023-10-31 13:18:43 -06:00
parent 03977fda6a
commit a6976daa25
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
6 changed files with 74 additions and 310 deletions

View file

@ -1,7 +1,7 @@
use cosmic::iced::keyboard::{KeyCode, Modifiers};
use std::{collections::HashMap, fmt};
use crate::{fl, Message};
use crate::Message;
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct KeyBind {
@ -26,6 +26,9 @@ impl KeyBind {
}};
}
bind!(CTRL, X, Cut);
bind!(CTRL, C, Copy);
bind!(CTRL, V, Paste);
bind!(CTRL, N, New);
bind!(CTRL, O, OpenFileDialog);
bind!(CTRL, S, Save);