Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion editor/src/messages/input_mapper/input_mappings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ pub fn input_mappings() -> Mapping {
//
// TextToolMessage
entry!(KeyUp(MouseLeft); action_dispatch=TextToolMessage::Interact),
entry!(KeyDown(Escape); action_dispatch=TextToolMessage::Abort),
entry!(KeyDown(Escape); action_dispatch=TextToolMessage::CommitText),
entry!(KeyDown(Enter); modifiers=[Accel], action_dispatch=TextToolMessage::CommitText),
//
// GradientToolMessage
Expand Down
8 changes: 4 additions & 4 deletions editor/src/messages/tool/tool_messages/text_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,10 @@ impl Fsm for TextToolFsmState {
HintGroup(vec![HintInfo::mouse(MouseMotion::Lmb, "Place Text")]),
HintGroup(vec![HintInfo::mouse(MouseMotion::Lmb, "Edit Text")]),
]),
TextToolFsmState::Editing => HintData(vec![
HintGroup(vec![HintInfo::keys([Key::Escape], "Discard Changes")]),
HintGroup(vec![HintInfo::keys([Key::Control, Key::Enter], "Commit Changes").add_mac_keys([Key::Command, Key::Enter])]),
]),
TextToolFsmState::Editing => HintData(vec![HintGroup(vec![
HintInfo::keys([Key::Control, Key::Enter], "").add_mac_keys([Key::Command, Key::Enter]),
HintInfo::keys([Key::Escape], "Commit Changes").prepend_slash(),
])]),
};

responses.add(FrontendMessage::UpdateInputHints { hint_data });
Expand Down