Navigation presets are now a table of bindings (button, required modifier keys, camera mode) instead of string matches. The Alias preset binds Shift+Alt+left to orbit, Shift+Alt+middle to pan and Shift+Alt+right to zoom. A left press with a binding's keys is latched until release, so that drag neither box-selects nor drags sketch geometry; plain left drags behave as before. Shift only requests snapping when the binding without Shift still orbits. The scenario harness sends Alt with ui.drag/ui.click, and camera checks can assert panned/zoomed since the last camera step. The user guide notes Alt+drag grabs by KDE and GNOME and how to free them. Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2cac9cad6a
commit
611422e4df
7 files changed
+278
-83
No files matched your search
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{"note": "Alias preset (#304): Shift+Alt+left drag orbits, Shift+Alt+middle pans, Shift+Alt+right zooms (down: out, up: in). Other presets don't navigate with Shift+Alt+left."},
|
||||
{"call": "engine.execute", "params": {"command": "solid.box", "params": {"length": 20, "width": 10, "height": 5}}},
|
||||
{"call": "ui.prefs", "params": {"nav": "alias"}},
|
||||
{"expect": {"prefs": {"nav": "alias"}}},
|
||||
|
||||
{"note": "Orbit: like a right drag (from the drag threshold on), and Shift (part of the binding) doesn't snap."},
|
||||
{"camera": {"yaw": 0, "pitch": 0}},
|
||||
{"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 848, "y1": 500, "steps": 8, "shift": true, "alt": true}},
|
||||
{"expect": {"camera": {"yaw_deg": 19.25, "pitch_deg": 0, "panned": false, "zoomed": "no"}, "selection": 0}},
|
||||
|
||||
{"note": "Pan."},
|
||||
{"camera": {"yaw": 0, "pitch": 0}},
|
||||
{"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 860, "y1": 540, "steps": 8, "shift": true, "alt": true, "button": "middle"}},
|
||||
{"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": true, "zoomed": "no"}}},
|
||||
|
||||
{"note": "Zoom (dolly): dragging down moves away, dragging up moves closer."},
|
||||
{"camera": {"yaw": 0, "pitch": 0}},
|
||||
{"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 800, "y1": 560, "steps": 8, "shift": true, "alt": true, "button": "right"}},
|
||||
{"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": false, "zoomed": "out"}, "dialog": null}},
|
||||
{"camera": {"yaw": 0, "pitch": 0}},
|
||||
{"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 800, "y1": 440, "steps": 8, "shift": true, "alt": true, "button": "right"}},
|
||||
{"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": false, "zoomed": "in"}}},
|
||||
|
||||
{"note": "Fusion: Shift+Alt+left drag is not navigation."},
|
||||
{"call": "ui.prefs", "params": {"nav": "fusion"}},
|
||||
{"camera": {"yaw": 0, "pitch": 0}},
|
||||
{"call": "ui.drag", "params": {"x0": 800, "y0": 500, "x1": 848, "y1": 500, "steps": 8, "shift": true, "alt": true}},
|
||||
{"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 0, "panned": false, "zoomed": "no"}}}
|
||||
]
|
||||
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{"note": "Alias preset (#304): a plain left drag still box-selects sketch geometry; the same drag with Shift+Alt orbits and selects nothing."},
|
||||
{"call": "ui.prefs", "params": {"nav": "alias"}},
|
||||
{"start": "sketch.create"},
|
||||
{"click": {"plane": "XY"}},
|
||||
{"call": "engine.execute", "params": {"command": "sketch.line", "params": {"points": [[10, 10], [30, 10]]}}},
|
||||
{"call": "ui.view", "params": {"view": "top"}},
|
||||
{"expect": {"camera": {"yaw_deg": 0, "pitch_deg": 90}}},
|
||||
{"drag": [{"sketch": [5, 4]}, {"sketch": [40, 20]}], "steps": 10},
|
||||
{"debug": 1},
|
||||
{"expect": {"selection": 3, "camera": {"yaw_deg": 0, "pitch_deg": 90}}},
|
||||
{"key": "Escape"},
|
||||
{"expect": {"selection": 0}},
|
||||
{"drag": [{"sketch": [5, 4]}, {"sketch": [40, 20]}], "steps": 10, "shift": true, "alt": true},
|
||||
{"expect": {"selection": 0, "sketching": true}}
|
||||
]
|
||||
Reference in new issue
Block a user