diff --git a/frontend/src/app/main/data/workspace/path/shortcuts.cljs b/frontend/src/app/main/data/workspace/path/shortcuts.cljs index fbe1483de6..e4f149f607 100644 --- a/frontend/src/app/main/data/workspace/path/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/path/shortcuts.cljs @@ -269,17 +269,17 @@ :section [:workspace] :fn #(st/emit! (drp/move-selected :down false))} - :move-unit-left {:tooltip ds/right-arrow + :move-unit-left {:tooltip ds/left-arrow :label (fn [] (tr "shortcuts.move-unit-left")) - :command "right" - :section [:workspace] - :fn #(st/emit! (drp/move-selected :right false))} - - :move-unit-right {:tooltip ds/left-arrow - :label (fn [] (tr "shortcuts.move-unit-right")) :command "left" :section [:workspace] - :fn #(st/emit! (drp/move-selected :left false))}}) + :fn #(st/emit! (drp/move-selected :left false))} + + :move-unit-right {:tooltip ds/right-arrow + :label (fn [] (tr "shortcuts.move-unit-right")) + :command "right" + :section [:workspace] + :fn #(st/emit! (drp/move-selected :right false))}}) (defn get-tooltip [shortcut] (assert (contains? shortcuts shortcut) (str shortcut)) diff --git a/frontend/src/app/main/data/workspace/shortcuts.cljs b/frontend/src/app/main/data/workspace/shortcuts.cljs index 9b8eb6bd09..5d05d6d8ba 100644 --- a/frontend/src/app/main/data/workspace/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/shortcuts.cljs @@ -326,19 +326,19 @@ :subsections [:modify-layers] :fn #(emit-when-no-readonly (dwt/move-selected :down false))} - :move-unit-left {:tooltip ds/right-arrow + :move-unit-left {:tooltip ds/left-arrow :label (fn [] (tr "shortcuts.move-unit-left")) - :command ["right" "alt+right"] - :subsections [:modify-layers] - :section [:workspace] - :fn #(emit-when-no-readonly (dwt/move-selected :right false))} - - :move-unit-right {:tooltip ds/left-arrow - :label (fn [] (tr "shortcuts.move-unit-right")) :command ["left" "alt+left"] + :subsections [:modify-layers] + :section [:workspace] + :fn #(emit-when-no-readonly (dwt/move-selected :left false))} + + :move-unit-right {:tooltip ds/right-arrow + :label (fn [] (tr "shortcuts.move-unit-right")) + :command ["right" "alt+right"] :section [:workspace] :subsections [:modify-layers] - :fn #(emit-when-no-readonly (dwt/move-selected :left false))} + :fn #(emit-when-no-readonly (dwt/move-selected :right false))} :artboard-selection {:tooltip (ds/meta (ds/alt "G")) :label (fn [] (tr "shortcuts.artboard-selection")) diff --git a/frontend/test/frontend_tests/ui/shortcuts_labels_test.cljs b/frontend/test/frontend_tests/ui/shortcuts_labels_test.cljs index 3f3715d1d7..3df04c3ccf 100644 --- a/frontend/test/frontend_tests/ui/shortcuts_labels_test.cljs +++ b/frontend/test/frontend_tests/ui/shortcuts_labels_test.cljs @@ -75,3 +75,11 @@ (ss/translation-keyname :sc :stale-id))) (t/is (= "shortcuts.preview-frame" (ss/translation-keyname :sc :preview-frame)))))) + +(t/deftest unit-move-commands-match-their-direction + (doseq [shortcuts [wsc/shortcuts psc/shortcuts] + dir ["up" "down" "left" "right"] + :let [id (keyword (str "move-unit-" dir)) + command (:command (get shortcuts id)) + commands (if (string? command) [command] command)]] + (t/is (= dir (first commands)) (str id " is bound to the " dir " arrow"))))