Skip to main content

ratatui_toolkit/master_layout/keybindings/methods/
is_focus_pane.rs

1//! is_focus_pane 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 focus pane key
8    pub fn is_focus_pane(&self, key: &KeyEvent) -> bool {
9        key.code == self.focus_pane.0 && key.modifiers == self.focus_pane.1
10    }
11}