From 87128d72d64b15360263e6eebc99f12691436d77 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 14:27:37 +0200 Subject: [PATCH] fix(keybinds): adapt key_bind.matches to new 3-arg signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream libcosmic added an Option<&Physical> third parameter to KeyBind::matches for physical-key matching. We pass None at every call site since these paths only have the logical key available. Also refresh Cargo.lock to satisfy the libcosmic-yoda squash rebase absorbed on 2026-05-25. Leyoda 2026 – GPLv3 --- Cargo.lock | 2 +- src/main.rs | 2 +- src/terminal_box.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a2b840..adc3193 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1393,7 +1393,7 @@ dependencies = [ [[package]] name = "cosmic-freedesktop-icons" version = "0.4.0" -source = "git+https://github.com/pop-os/freedesktop-icons#9c562fe3ecf03241a46a60c0078cd6ea10bd75ce" +source = "git+https://github.com/pop-os/freedesktop-icons#739e266210d471c09af61d529d8f41dccd815b90" dependencies = [ "bstr", "btoi", diff --git a/src/main.rs b/src/main.rs index 0cf5222..9096544 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2473,7 +2473,7 @@ impl Application for App { // Handle configurable keys for (key_bind, action) in &self.key_binds { - if key_bind.matches(modifiers, &key) { + if key_bind.matches(modifiers, &key, None) { return self.update(action.message(None)); } } diff --git a/src/terminal_box.rs b/src/terminal_box.rs index 9be9f0d..d3c3a8b 100644 --- a/src/terminal_box.rs +++ b/src/terminal_box.rs @@ -942,7 +942,7 @@ where .. }) if state.is_focused && named == modified_named => { for key_bind in self.key_binds.keys() { - if key_bind.matches(*modifiers, &Key::Named(*named)) { + if key_bind.matches(*modifiers, &Key::Named(*named), None) { shell.capture_event(); return; } @@ -1130,7 +1130,7 @@ where .. }) if state.is_focused => { for key_bind in self.key_binds.keys() { - if key_bind.matches(*modifiers, key) { + if key_bind.matches(*modifiers, key, None) { shell.capture_event(); return;