Skip to main content

ratatui_toolkit/vt100_term/key_binding/methods/
matches.rs

1//! KeyBinding::matches method
2
3use crate::vt100_term::key_binding::KeyBinding;
4
5impl KeyBinding {
6    /// Check if a key event matches this binding
7    pub fn matches(&self, key: &crossterm::event::KeyEvent) -> bool {
8        key.code == self.code && key.modifiers == self.modifiers
9    }
10}