From 80290baaf6cc6ff4e7f05fa0d0abe4f16f53433d Mon Sep 17 00:00:00 2001 From: George Peden Date: Wed, 10 Sep 2025 19:34:53 -1000 Subject: [PATCH] Add mode-aware keyboard shortcuts to B-spline hints - Control Points mode: U/J for degree control (+ degree, - degree) - Knots mode: R for periodic toggle - Hints are now context-aware based on construction method - Addresses issue #23815 for missing keyboard shortcuts in hints --- src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h index 7858833e49..c886423834 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h @@ -420,6 +420,8 @@ private: { {tr("%1 pick first control point"), {MouseLeft}}, switchModeHint, + {tr("%1 + degree"), {KeyU}}, + {tr("%1 - degree"), {KeyJ}}, }}, {.state = {ConstructionMethod::ControlPoints, SelectMode::SeekSecond}, .hints = @@ -427,6 +429,8 @@ private: {tr("%1 pick next control point"), {MouseLeft}}, {tr("%1 finish B-spline"), {MouseRight}}, switchModeHint, + {tr("%1 + degree"), {KeyU}}, + {tr("%1 - degree"), {KeyJ}}, }}, // Knots method @@ -435,6 +439,7 @@ private: { {tr("%1 pick first knot"), {MouseLeft}}, switchModeHint, + {tr("%1 toggle periodic"), {KeyR}}, }}, {.state = {ConstructionMethod::Knots, SelectMode::SeekSecond}, .hints = @@ -442,6 +447,7 @@ private: {tr("%1 pick next knot"), {MouseLeft}}, {tr("%1 finish B-spline"), {MouseRight}}, switchModeHint, + {tr("%1 toggle periodic"), {KeyR}}, }}, }); }