fix: add alt clipboard bindings for text_editor
This commit is contained in:
parent
62b90179a2
commit
7afd9ee0f8
1 changed files with 17 additions and 0 deletions
|
|
@ -1287,6 +1287,23 @@ impl<Message> Binding<Message> {
|
|||
return Some(binding);
|
||||
}
|
||||
|
||||
let alt_clipboard = match key.as_ref() {
|
||||
keyboard::Key::Named(key::Named::Insert) if modifiers.shift() => {
|
||||
Some(Self::Paste)
|
||||
}
|
||||
keyboard::Key::Named(key::Named::Insert) if modifiers.command() => {
|
||||
Some(Self::Copy)
|
||||
}
|
||||
keyboard::Key::Named(key::Named::Delete) if modifiers.shift() => {
|
||||
Some(Self::Cut)
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
|
||||
if let Some(binding) = alt_clipboard {
|
||||
return Some(binding);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
let modified_key =
|
||||
convert_macos_shortcut(&key, modifiers).unwrap_or(modified_key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue