ratatui_toolkit/master_layout/keybindings/methods/is_copy_selection.rs
1//! is_copy_selection method for MasterLayoutKeyBindings
2
3use crate::master_layout::keybindings::MasterLayoutKeyBindings;
4use crossterm::event::KeyEvent;
5
6impl MasterLayoutKeyBindings {
7 /// Check if the given key event matches the copy selection key
8 pub fn is_copy_selection(&self, key: &KeyEvent) -> bool {
9 key.code == self.copy_selection.0 && key.modifiers.contains(self.copy_selection.1)
10 }
11}