Repository: GraphiteEditor/Graphite (language: rust)

Issue:
Tracking Issue: Pen and Path tool improvements
Much of this is explained/demonstrated in this detailed webcast: https://youtu.be/OmveqhzXJFg

## Path tool

When dragging a handle:
- [x] <kbd>Alt</kbd> keeps the handles equidistant while pressed (instead of <kbd>Shift</kbd> in use now) (#2058)
- [x] <kbd>Alt</kbd>, as part of keeping the handles equidistant, also creates a matching handle if the other is zero-length or not a cubic Bézier (#2196)
- [x] <kbd>Shift</kbd> locks the handle angle to 15° increments (shouldn't interfere with <kbd>Shift</kbd>-clicking handles for multi-selecting points such as handles) (#2160)
- [x] <kbd>Ctrl</kbd> locks the current angle of the handle (#2160)
- [x] <kbd>Tab</kbd> swaps to dragging the opposite handle (native: teleports the cursor / web: enters pointer lock and draws a fake cursor at the new location) (#2058)
- [x] <kbd>Space</kbd> shifts the anchor (and handles) while pressed (#2065)
- [x] <kbd>C</kbd> toggles bent vs. colinear handles (instead of <kbd>Alt</kbd> in use now) (#2058)

When dragging an anchor:
- [ ] <kbd>Alt</kbd> **(new since video was recorded)**, if held during the start of the click-drag, converts the anchor's handles to colinear and drags the handle pair instead of the anchor, keeping them equidistant unless <kbd>Alt</kbd> is released to temporarily return the opposite handle back to where it started before the <kbd>Alt</kbd>-drag began (which involves returning its colinear state back to what it was before). Should work with <kbd>Tab</kbd> to swap which is the dragged handle, so its opposite can be the one that's returned if <kbd>Alt</kbd> is temporarily released. Just <kbd>Alt</kbd> clicking but not dragging the anchor should remove both handles by setting them to zero length.
- [ ] <kbd>Ctrl</kbd> **(new since video was recorded)**, if pressed before the drag begins, should select and drag a zero-length handle out of its anchor locked to the angle of the opposite non-zero-length handle, which it should be made colinear to. This applies only to anchors with two handles where exactly one is zero-length. Otherwise, the key is ignored and the anchor is dragged per usual. One more scenario is where a non-endpoint anchor has no handles (they're both zero-length), if <kbd>Ctrl</kbd> and <kbd>Alt</kbd> (see previous bullet point) are both pressed before dragging, it locks the angle to that of the [line perpendicular to the average of the two tangents](https://files.keavon.com/-/NovelGruesomePangolin/capture.png) from that anchor to its adjacent curves.
- [ ] <kbd>Shift</kbd>, locks the drag to the nearer of the X or Y axes from its drag starting point. (If pressed before the drag begins, it shouldn't break <kbd>Shift</kbd>-clicking points to add to the selection.)
- [ ] <kbd>Ctrl</kbd><kbd>Shift</kbd> **(updated since video was recorded which indicated this would use <kbd>Alt</kbd>)** slides the anchor along its adjacent segment(s) while adjusting its handle(s) to best approximate the initial curvature. This will require a computational geometry algorithm researched and added to our Bezier-rs library. (If pressed before the drag begins, it shouldn't break <kbd>Shift</kbd>-clicking points to add to the selection.)

When double-clicking an anchor **(new since video was recorded)**:
- [ ] Currently this swaps between smooth and sharp, but doesn't work if multiple handles are multi-selected to convert them all to smooth or sharp. If they're of mixed type, the specific on that's double clicked on should be the decider for the rest of them as to which they should all be swapped to.

When clicking a segment **(new since video was recorded)**:
- [ ] Clicking without any modifier key should split the segment where clicked. Currently this has the extra complication of entering an insertion mode where the point of the segment split can be slid within the segment and left click confirms it while right click cancels. We want to remove that extra step and just insert directly. An overlay should be drawn in cases where the cursor is hovered over the segment such that clicking would insert a split, it should be a short line segment (20px in diameter) running perpendicular to the curve.
- [ ] <kbd>Ctrl</kbd> clicking should delete the segment that's clicked. Currently a user would have to split the segment then delete the newly created point.
- [ ] Clicking and dragging without any modifier key should [mold the segment](https://pomax.github.io/bezierinfo/#molding) as per #615.

When a single handle is selected:
- [x] <kbd>R</kbd> rotates about its anchor (#2180)
- [x] <kbd>S</kbd> scales about its anchor (#2180)

## Pen tool

When no drawing has begun yet (pointer is up):
- [x] **(New since video was recorded)** clicking a path's endpoint should begin drawing from it with an initial handle that's colinear and equidistant from the opposite handle, instead of the current behavior where clicking the endpoint begins drawing the segment with a zero-length handle. If the user wants the current behavior, they can simply click the endpoint anchor a second time to make the current segment's handle zero-length. This solves the pain point that switching away from the Pen tool, then back to it, causes a discontinuity at the previous endpoint where the handles can't easily be opposite each other like when drawing consecutive segments normally. (#2295)

When stretching out a segment to be placed (pointer is up):
- [x] <kbd>Backspace</kbd>/<kbd>Delete</kbd> removes the current segment's handle (equivalent to clicking the current anchor) (#2180)
- [x] <kbd>G</kbd> grabs (translates) the current segment's connected outgoing handle (#2211)
- [x] <kbd>R</kbd> rotates the current segment's connected outgoing handle about its anchor (#2211)
- [x] <kbd>S</kbd> scales the current segment's connected outgoing handle about its anchor (#2211)

When dragging the handles of the segment being placed (pointer is down):
- [x] <kbd>C</kbd> toggles bent vs. colinear handles (instead of the momentary <kbd>Alt</kbd> in use now) (#2242)
- [x] <kbd>Alt</kbd> stops keeping the handles equidistant while pressed, as long as they're currently colinear (otherwise it does nothing). Exception: the reverse is the case (it keeps the handles equidistant while pressed) when the click-drag began with a single handle (either by click-dragging the current segment's connected anchor, click-dragging an endpoint of an existing not-yet-being-edited layer, or click-dragging the start point to close the shape) but <kbd>Ctrl</kbd> was pressed to keep (#2242)
- [x] <kbd>Ctrl</kbd> locks the current angle of the handle (already implemented), but should also work to be colinear with the opposite handle if being dragged out of an existing anchor point, or if that anchor point has no handle then it should use the angle of the actual curve segment entering that handle, i.e. its tangent angle at its endpoint (#2284)
- [ ] <kbd>Space</kbd> shifts the anchor (and handles) while pressed
- [ ] <kbd>Tab</kbd> swaps to dragging the opposite handle (native: teleports the cursor / web: enters pointer lock and draws a fake cursor at the new location)
- [ ] If the current segment is closing the shape by connecting to its start point, the handle that's being dragged should be the closing handle, not a fake handle on the opposite side, and all the above shortcuts should work on that anchor/handle group spanning the start/end point (<kbd>Tab</kbd> will modify the shape of the first segment while the current/final segment is still in-progress)
- [ ] All the above shortcuts should work with the "Bend Prev. Point" case where the current segment's connected anchor can be clicked to turn it sharp or click-dragged to bend its outgoing handle (turning its handles to not colinear), meaning <kbd>C</kbd> should be able to turn it back to colinear

---

- Not yet figured out: improving the UX for extending an endpoint with a new segment, by having control to extend the handle on either end of the new segment instead of just the new endpoint's side, and by locking the angle of the new endpoint side's handle to avoid a discontinuity. [Video](https://files.keavon.com/-/PoliticalGiantQueensnake/capture_22_.mp4).


Discussion / hints:
Aight, I start with it. Wish me luck
Here are some more potential additions (coming from features I found useful in an abandoned vector graphics editor I had been working on years ago; originally listed [here](https://news.ycombinator.com/item?id=41854972)):

- shift+G/R/S (or some other modifier) for setting handle mode (bent, colinear, and colinear+equidistant respectively) is a potential intuitive keybind option kinda following what regular g/r/s do;
- that handle mode can be displayed visually as different icons on the point (square for bent, rectangle aligned to angle for colinear, and perhaps circle for equidistant, though that may get confusing with handles being circles; ellipse?)
- allow both rotate and scale at the same time (maybe never useful but I still had this ¯\\\_(ツ)\_/¯)
- middle-mouse-dragging while holding an element should ignore the delta mouse movement during the movement (currently doing this in Graphite results in jumpiness)
- another option for visual indicators r/g/s:
  - g: a line from the starting mouse position in the canvas to where it'd be dragged to
  - s: line from the anchor point through the current and original mouse position with different colors (i.e. the ratio of the color lengths is the ratio of scaling)
  - r: lines from the anchor to original & current mouse position, with an arc in between (very busy-looking, don't quite like it)

Some general actions:
- cut a path into two, snapping to cutting on an existing point if near enough (potentially, if dragging, could cut into three segments)
- join paths if two end-points are selected (incl. closing a path)
- select all points linked to currently already selected ones

[screen recording](https://github.com/user-attachments/assets/f64318f6-7f70-4b6e-88ad-33edaccffed8) showing some of these in my editor


Thank you for posting those here @dzaima! The feedback and ideas are very useful.
Hey, I plan working on the remaining few things for the path tool. I will be traveling for the next few weeks so wont be able to start anytime soon. Although if anyone else wants to pick them up before im back feel free!
@DaraghD hello again, I hope your travels were fruitful! Just wanted to see if you're interested in returning to some of the bullet points in this issue. In particular, the Pen tool ones aren't being attempted by anybody yet so those would be free to work on anytime you'd like, perhaps if you have some time over the holidays. Cheers!

Fix patch:
diff --git a/editor/src/consts.rs b/editor/src/consts.rs
index 69e54f8743..d14efb2409 100644
--- a/editor/src/consts.rs
+++ b/editor/src/consts.rs
@@ -62,6 +62,7 @@ pub const MANIPULATOR_GROUP_MARKER_SIZE: f64 = 6.;
 pub const SELECTION_THRESHOLD: f64 = 10.;
 pub const HIDE_HANDLE_DISTANCE: f64 = 3.;
 pub const INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE: f64 = 50.;
+pub const HANDLE_ROTATE_SNAP_ANGLE: f64 = 15.;
 
 // Pen tool
 pub const CREATE_CURVE_THRESHOLD: f64 = 5.;
diff --git a/editor/src/messages/input_mapper/input_mappings.rs b/editor/src/messages/input_mapper/input_mappings.rs
index 9cdb03d7f5..9ff6e41294 100644
--- a/editor/src/messages/input_mapper/input_mappings.rs
+++ b/editor/src/messages/input_mapper/input_mappings.rs
@@ -206,8 +206,8 @@ pub fn input_mappings() -> Mapping {
 		// PathToolMessage
 		entry!(KeyDown(Delete); modifiers=[Accel], action_dispatch=PathToolMessage::DeleteAndBreakPath),
 		entry!(KeyDown(Backspace); modifiers=[Accel], action_dispatch=PathToolMessage::DeleteAndBreakPath),
-		entry!(KeyDown(Delete); modifiers=[Accel, Shift], action_dispatch=PathToolMessage::BreakPath),
-		entry!(KeyDown(Backspace); modifiers=[Accel, Shift], action_dispatch=PathToolMessage::BreakPath),
+		entry!(KeyDown(Delete); modifiers=[Shift], action_dispatch=PathToolMessage::BreakPath),
+		entry!(KeyDown(Backspace); modifiers=[Shift], action_dispatch=PathToolMessage::BreakPath),
 		entry!(KeyDown(Tab); action_dispatch=PathToolMessage::SwapSelectedHandles),
 		entry!(KeyDown(MouseLeft); action_dispatch=PathToolMessage::MouseDown { direct_insert_without_sliding: Control, extend_selection: Shift }),
 		entry!(KeyDown(MouseRight); action_dispatch=PathToolMessage::RightClick),
@@ -215,7 +215,7 @@ pub fn input_mappings() -> Mapping {
 		entry!(KeyDown(KeyG); action_dispatch=PathToolMessage::GRS { key: KeyG }),
 		entry!(KeyDown(KeyR); action_dispatch=PathToolMessage::GRS { key: KeyR }),
 		entry!(KeyDown(KeyS); action_dispatch=PathToolMessage::GRS { key: KeyS }),
-		entry!(PointerMove; refresh_keys=[KeyC, Shift, Alt, Space], action_dispatch=PathToolMessage::PointerMove { toggle_colinear: KeyC, equidistant: Alt, move_anchor_with_handles: Space}),
+		entry!(PointerMove; refresh_keys=[KeyC, Space, Control, Shift, Alt], action_dispatch=PathToolMessage::PointerMove { toggle_colinear: KeyC, equidistant: Alt, move_anchor_with_handles: Space, snap_angle: Shift, lock_angle: Control }),
 		entry!(KeyDown(Delete); action_dispatch=PathToolMessage::Delete),
 		entry!(KeyDown(KeyA); modifiers=[Accel], action_dispatch=PathToolMessage::SelectAllAnchors),
 		entry!(KeyDown(KeyA); modifiers=[Accel, Shift], action_dispatch=PathToolMessage::DeselectAllPoints),
diff --git a/editor/src/messages/tool/tool_messages/path_tool.rs b/editor/src/messages/tool/tool_messages/path_tool.rs
index a30cfeca3e..2b6da0ecf3 100644
--- a/editor/src/messages/tool/tool_messages/path_tool.rs
+++ b/editor/src/messages/tool/tool_messages/path_tool.rs
@@ -1,12 +1,12 @@
 use super::tool_prelude::*;
-use crate::consts::{COLOR_OVERLAY_YELLOW, DRAG_THRESHOLD, INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE, SELECTION_THRESHOLD, SELECTION_TOLERANCE};
+use crate::consts::{COLOR_OVERLAY_YELLOW, DRAG_THRESHOLD, HANDLE_ROTATE_SNAP_ANGLE, INSERT_POINT_ON_SEGMENT_TOO_FAR_DISTANCE, SELECTION_THRESHOLD, SELECTION_TOLERANCE};
 use crate::messages::portfolio::document::overlays::utility_functions::path_overlays;
 use crate::messages::portfolio::document::overlays::utility_types::OverlayContext;
 use crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier;
 use crate::messages::portfolio::document::utility_types::network_interface::NodeNetworkInterface;
 use crate::messages::tool::common_functionality::auto_panning::AutoPanning;
 use crate::messages::tool::common_functionality::shape_editor::{ClosestSegment, ManipulatorAngle, OpposingHandleLengths, SelectedPointsInfo, ShapeState};
-use crate::messages::tool::common_functionality::snapping::{SnapCache, SnapCandidatePoint, SnapData, SnapManager};
+use crate::messages::tool::common_functionality::snapping::{SnapCache, SnapCandidatePoint, SnapConstraint, SnapData, SnapManager};
 
 use graphene_core::renderer::Quad;
 use graphene_core::vector::ManipulatorPointId;
@@ -59,11 +59,15 @@ pub enum PathToolMessage {
 		equidistant: Key,
 		toggle_colinear: Key,
 		move_anchor_with_handles: Key,
+		snap_angle: Key,
+		lock_angle: Key,
 	},
 	PointerOutsideViewport {
 		equidistant: Key,
 		toggle_colinear: Key,
 		move_anchor_with_handles: Key,
+		snap_angle: Key,
+		lock_angle: Key,
 	},
 	RightClick,
 	SelectAllAnchors,
@@ -294,6 +298,7 @@ struct PathToolData {
 	saved_points_before_anchor_select_toggle: Vec<ManipulatorPointId>,
 	select_anchor_toggled: bool,
 	dragging_state: DraggingState,
+	angle: f64,
 }
 
 impl PathToolData {
@@ -466,13 +471,114 @@ impl PathToolData {
 		false
 	}
 
-	fn drag(&mut self, equidistant: bool, shape_editor: &mut ShapeState, document: &DocumentMessageHandler, input: &InputPreprocessorMessageHandler, responses: &mut VecDeque<Message>) {
-		// Move the selected points with the mouse
-		let previous_mouse = document.metadata().document_to_viewport.transform_point2(self.previous_mouse_position);
-		let snapped_delta = shape_editor.snap(&mut self.snap_manager, &self.snap_cache, document, input, previous_mouse);
+	/// Attempts to get a single selected handle. Also retrieves the position of the anchor it is connected to. Used for the purpose of snapping the angle.
+	fn try_get_selected_handle_and_anchor(&self, shape_editor: &ShapeState, document: &DocumentMessageHandler) -> Option<(DVec2, DVec2)> {
+		// Only count selections of a single layer
+		let (layer, selection) = shape_editor.selected_shape_state.iter().next()?;
+
+		// Do not allow selections of multiple points to count
+		if selection.selected_points_count() != 1 {
+			return None;
+		}
+
+		// Only count selected handles
+		let selected_handle = selection.selected().next()?.as_handle()?;
+
+		let layer_to_document = document.metadata().transform_to_document(*layer);
+		let vector_data = document.network_interface.compute_modified_vector(*layer)?;
+
+		let handle_position_local = selected_handle.to_manipulator_point().get_position(&vector_data)?;
+		let anchor_id = selected_handle.to_manipulator_point().get_anchor(&vector_data)?;
+		let anchor_position_local = vector_data.point_domain.position_from_id(anchor_id)?;
+
+		let handle_position_document = layer_to_document.transform_point2(handle_position_local);
+		let anchor_position_document = layer_to_document.transform_point2(anchor_position_local);
+
+		Some((handle_position_document, anchor_position_document))
+	}
+
+	fn calculate_handle_angle(&mut self, handle_vector: DVec2, lock_angle: bool, snap_angle: bool) -> f64 {
+		let mut handle_angle = -handle_vector.angle_to(DVec2::X);
+
+		// When the angle is locked we use the old angle
+		if lock_angle {
+			handle_angle = self.angle
+		}
+
+		// Round the angle to the closest increment
+		if snap_angle {
+			let snap_resolution = HANDLE_ROTATE_SNAP_ANGLE.to_radians();
+			handle_angle = (handle_angle / snap_resolution).round() * snap_resolution;
+		}
+
+		// Cache the old handle angle for the lock angle.
+		self.angle = handle_angle;
+
+		handle_angle
+	}
+
+	fn apply_snapping(
+		&mut self,
+		handle_direction: DVec2,
+		new_handle_position: DVec2,
+		anchor_position: DVec2,
+		using_angle_constraints: bool,
+		handle_position: DVec2,
+		document: &DocumentMessageHandler,
+		input: &InputPreprocessorMessageHandler,
+	) -> DVec2 {
+		let snap_data = SnapData::new(document, input);
+		let snap_point = SnapCandidatePoint::handle_neighbors(new_handle_position, [anchor_position]);
+
+		let snap_result = match using_angle_constraints {
+			true => {
+				let snap_constraint = SnapConstraint::Line {
+					origin: anchor_position,
+					direction: handle_direction.normalize_or_zero(),
+				};
+				self.snap_manager.constrained_snap(&snap_data, &snap_point, snap_constraint, Default::default())
+			}
+			false => self.snap_manager.free_snap(&snap_data, &snap_point, Default::default()),
+		};
+
+		self.snap_manager.update_indicator(snap_result.clone());
+
+		document.metadata().document_to_viewport.transform_vector2(snap_result.snapped_point_document - handle_position)
+	}
+
+	fn drag(
+		&mut self,
+		equidistant: bool,
+		lock_angle: bool,
+		snap_angle: bool,
+		shape_editor: &mut ShapeState,
+		document: &DocumentMessageHandler,
+		input: &InputPreprocessorMessageHandler,
+		responses: &mut VecDeque<Message>,
+	) {
+		let document_to_viewport = document.metadata().document_to_viewport;
+		let previous_mouse = document_to_viewport.transform_point2(self.previous_mouse_position);
+		let current_mouse = input.mouse.position;
+		let raw_delta = document_to_viewport.inverse().transform_vector2(current_mouse - previous_mouse);
+
+		let snapped_delta = if let Some((handle_pos, anchor_pos)) = self.try_get_selected_handle_and_anchor(shape_editor, document) {
+			let cursor_pos = handle_pos + raw_delta;
+
+			let handle_angle = self.calculate_handle_angle(cursor_pos - anchor_pos, lock_angle, snap_angle);
+
+			let constrained_direction = DVec2::new(handle_angle.cos(), handle_angle.sin());
+			let projected_length = (cursor_pos - anchor_pos).dot(constrained_direction);
+			let constrained_target = anchor_pos + constrained_direction * projected_length;
+			let constrained_delta = constrained_target - handle_pos;
+
+			self.apply_snapping(constrained_direction, handle_pos + constrained_delta, anchor_pos, lock_angle || snap_angle, handle_pos, document, input)
+		} else {
+			shape_editor.snap(&mut self.snap_manager, &self.snap_cache, document, input, previous_mouse)
+		};
+
 		let handle_lengths = if equidistant { None } else { self.opposing_handle_lengths.take() };
 		shape_editor.move_selected_points(handle_lengths, document, snapped_delta, equidistant, responses, true);
-		self.previous_mouse_position += document.metadata().document_to_viewport.inverse().transform_vector2(snapped_delta);
+		self.previous_mouse_position += document_to_viewport.inverse().transform_vector2(snapped_delta);
 	}
 }
 
@@ -574,6 +680,8 @@ impl Fsm for PathToolFsmState {
 					equidistant,
 					toggle_colinear,
 					move_anchor_with_handles,
+					snap_angle,
+					lock_angle,
 				},
 			) => {
 				tool_data.previous_mouse_position = input.mouse.position;
@@ -585,12 +693,16 @@ impl Fsm for PathToolFsmState {
 						equidistant,
 						toggle_colinear,
 						move_anchor_with_handles,
+						snap_angle,
+						lock_angle,
 					}
 					.into(),
 					PathToolMessage::PointerMove {
 						equidistant,
 						toggle_colinear,
 						move_anchor_with_handles,
+						snap_angle,
+						lock_angle,
 					}
 					.into(),
 				];
@@ -604,6 +716,8 @@ impl Fsm for PathToolFsmState {
 					equidistant,
 					toggle_colinear,
 					move_anchor_with_handles,
+					snap_angle,
+					lock_angle,
 				},
 			) => {
 				if tool_data.selection_status.is_none() {
@@ -631,8 +745,19 @@ impl Fsm for PathToolFsmState {
 
 				let toggle_colinear_state = input.keyboard.get(toggle_colinear as usize);
 				let equidistant_state = input.keyboard.get(equidistant as usize);
-				if !tool_data.update_colinear(equidistant_state, toggle_colinear_state, shape_editor, document, responses) {
-					tool_data.drag(equidistant_state, shape_editor, document, input, responses);
+				let lock_angle_state = input.keyboard.get(lock_angle as usize);
+				let snap_angle_state = input.keyboard.get(snap_angle as usize);
+
+				if !tool_data.update_colinear(equidistant_state, toggle_colinear_state, tool_action_data.shape_editor, tool_action_data.document, responses) {
+					tool_data.drag(
+						equidistant_state,
+						lock_angle_state,
+						snap_angle_state,
+						tool_action_data.shape_editor,
+						tool_action_data.document,
+						input,
+						responses,
+					);
 				}
 
 				// Auto-panning
@@ -641,12 +766,16 @@ impl Fsm for PathToolFsmState {
 						toggle_colinear,
 						equidistant,
 						move_anchor_with_handles,
+						snap_angle,
+						lock_angle,
 					}
 					.into(),
 					PathToolMessage::PointerMove {
 						toggle_colinear,
 						equidistant,
 						move_anchor_with_handles,
+						snap_angle,
+						lock_angle,
 					}
 					.into(),
 				];
@@ -662,11 +791,19 @@ impl Fsm for PathToolFsmState {
 
 				PathToolFsmState::DrawingBox
 			}
-			(PathToolFsmState::Dragging(dragging_state), PathToolMessage::PointerOutsideViewport { equidistant, .. }) => {
+			(
+				PathToolFsmState::Dragging(dragging_state),
+				PathToolMessage::PointerOutsideViewport {
+					equidistant, snap_angle, lock_angle, ..
+				},
+			) => {
 				// Auto-panning
 				if tool_data.auto_panning.shift_viewport(input, responses).is_some() {
 					let equidistant = input.keyboard.get(equidistant as usize);
-					tool_data.drag(equidistant, shape_editor, document, input, responses);
+					let snap_angle = input.keyboard.get(snap_angle as usize);
+					let lock_angle = input.keyboard.get(lock_angle as usize);
+
+					tool_data.drag(equidistant, lock_angle, snap_angle, shape_editor, document, input, responses);
 				}
 
 				PathToolFsmState::Dragging(dragging_state)
@@ -677,6 +814,8 @@ impl Fsm for PathToolFsmState {
 					equidistant,
 					toggle_colinear,
 					move_anchor_with_handles,
+					snap_angle,
+					lock_angle,
 				},
 			) => {
 				// Auto-panning
@@ -685,12 +824,16 @@ impl Fsm for PathToolFsmState {
 						equidistant,
 						toggle_colinear,
 						move_anchor_with_handles,
+						snap_angle,
+						lock_angle,
 					}
 					.into(),
 					PathToolMessage::PointerMove {
 						equidistant,
 						toggle_colinear,
 						move_anchor_with_handles,
+						snap_angle,
+						lock_angle,
 					}
 					.into(),
 				];
@@ -890,7 +1033,12 @@ impl Fsm for PathToolFsmState {
 
 				let drag_anchor = HintInfo::keys([Key::Space], "Drag Anchor");
 				let point_select_state_hint_group = match dragging_state.point_select_state {
-					PointSelectState::HandleNoPair => vec![drag_anchor],
+					PointSelectState::HandleNoPair => {
+						let mut hints = vec![drag_anchor];
+						hints.push(HintInfo::keys([Key::Shift], "Snap 15°"));
+						hints.push(HintInfo::keys([Key::Control], "Lock Angle"));
+						hints
+					}
 					PointSelectState::HandleWithPair => {
 						let mut hints = vec![drag_anchor];
 						hints.push(HintInfo::keys([Key::Tab], "Swap Selected Handles"));
@@ -905,6 +1053,8 @@ impl Fsm for PathToolFsmState {
 						if colinear != ManipulatorAngle::Free {
 							hints.push(HintInfo::keys([Key::Alt], "Equidistant Handles"));
 						}
+						hints.push(HintInfo::keys([Key::Shift], "Snap 15°"));
+						hints.push(HintInfo::keys([Key::Control], "Lock Angle"));
 						hints
 					}
 					PointSelectState::Anchor => Vec::new(),


Test patch: