From 50ae733d66877376db09bbf2b6b33fb1d376971c Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 22 Oct 2026 04:09:12 +0000 Subject: [PATCH] =?UTF-8?q?Integration:=20Alt+arrow=20leaves=20a=20selecte?= =?UTF-8?q?d=20field=20in=20place=20for=20Calculation=20order=20(#2621=20?= =?UTF-8?q?=C3=97=20#3733)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prepare a form's arrow-key nudge (#2621) consumed Alt+↑/↓ as plain arrows, because egui's consume_key ignores an extra Alt. Calculation order (#3733) moves the selected field with Alt+↑/↓, so the field moved a point on the page instead of in the order. The nudge now leaves Alt+arrow alone. --- crates/ui-egui/src/prepare.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/prepare.rs b/crates/ui-egui/src/prepare.rs index 22cd4e640..13767e55f 100644 --- a/crates/ui-egui/src/prepare.rs +++ b/crates/ui-egui/src/prepare.rs @@ -569,7 +569,8 @@ pub(crate) fn delete_selected(view: &mut DocView) -> Option { /// as the object nudge does (`object_ui::nudge_keys`) and as dragging it does (#2608). The keys /// are consumed before the view turns the page with them; one press is one undo step. pub(crate) fn nudge_keys(ctx: &egui::Context, view: &mut DocView, doc: &Document) { - if ctx.egui_wants_keyboard_input() || view.prepare.grab.is_some() { + // `consume_key` lets an extra Alt through, and Alt+↑/↓ belongs to Calculation order's move. + if ctx.egui_wants_keyboard_input() || view.prepare.grab.is_some() || ctx.input(|i| i.modifiers.alt) { return; } let Some((name, wi)) = view.prepare.selected.clone() else { return };