From 25845183f1e2e29a973c556d030e66f8352914e7 Mon Sep 17 00:00:00 2001 From: Paul Daniel Faria Date: Tue, 7 Jan 2025 22:55:14 -0800 Subject: [PATCH] Fix broken numlock behavior libcosmic broke backwards compatibility in pop-os/libcosmic@0491c4b Add comparison with modified_key to ensure only actual named keys are processed as such. --- src/terminal_box.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/terminal_box.rs b/src/terminal_box.rs index a7e1250..e171c82 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -693,10 +693,11 @@ where match event { Event::Keyboard(KeyEvent::KeyPressed { key: Key::Named(named), + modified_key: Key::Named(modified_named), modifiers, text, .. - }) if state.is_focused => { + }) if state.is_focused && named == modified_named => { for key_bind in self.key_binds.keys() { if key_bind.matches(modifiers, &Key::Named(named)) { return Status::Captured;