From ea2becf4c7ed4a41b0de45921f3bf1f72487b8df Mon Sep 17 00:00:00 2001 From: Olive Vaughn Date: Sat, 10 Oct 2026 20:43:41 -0400 Subject: [PATCH] Plain letters, shift for a companion, never alt T switches tracing and G onion skin (ghosts); shift-I and shift-O clear the in and out marks; M and shift-M make a symbol or a lane at the top of the tab. Alt types characters on a Mac and belongs to the browser elsewhere, so no key uses it now, and shift only ever pairs with the plain key it modifies. Co-Authored-By: Claude Opus 5.5 --- frontend/src/arthur/events/playback.cljs | 8 ++++++-- frontend/src/arthur/ui/shortcuts.cljs | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/frontend/src/arthur/events/playback.cljs b/frontend/src/arthur/events/playback.cljs index 59395f7..d96a40f 100644 --- a/frontend/src/arthur/events/playback.cljs +++ b/frontend/src/arthur/events/playback.cljs @@ -135,8 +135,12 @@ :out (assoc marks :out (cond-> f in (max in)))))))) (rf/reg-event-db - ::clear-marks - (fn [db _] (update-in db [:playback :range] dissoc (get-in db [:ui :open])))) + ::clear-mark + ;; ⇧I and ⇧O. With neither mark left, the tab plays as it did before marks. + (fn [db [_ which]] + (let [path [:playback :range (get-in db [:ui :open])] + marks (dissoc (get-in db path) which)] + (if (seq marks) (assoc-in db path marks) (update-in db (pop path) dissoc (peek path)))))) (rf/reg-event-fx ::set-rate diff --git a/frontend/src/arthur/ui/shortcuts.cljs b/frontend/src/arthur/ui/shortcuts.cljs index 59d5c18..e3fbb5c 100644 --- a/frontend/src/arthur/ui/shortcuts.cljs +++ b/frontend/src/arthur/ui/shortcuts.cljs @@ -16,7 +16,11 @@ THE KEYS ARE BLENDER'S, then Resolve's, then Flash's and Harmony's. WASD repeats the arrows for a hand that stays on the left of the keyboard while the other holds the pen. Letters are matched by where they are on the keyboard, not by what they - type, so WASD is WASD on any layout and ⌥O is O on a Mac too." + type, so WASD is WASD on any layout. + + SHIFT IS THE ONE MODIFIER, and ⌘ only where the browser's own convention is + (undo, the clipboard). Alt types characters on a Mac and is the browser's + elsewhere, so nothing here uses it — a key with it passes through untouched." (:require [arthur.events.history :as history] [arthur.events.playback :as pb] [arthur.events.ui :as ui] @@ -67,10 +71,11 @@ {:label "Mark in" :keys ["i"] :run (constantly [::pb/mark :in]) :note "playback loops between the marks"} {:label "Mark out" :keys ["o"] :run (constantly [::pb/mark :out])} - {:label "Clear the marks" :keys ["alt+x"] :run (constantly [::pb/clear-marks])} - {:label "Tracing" :keys ["alt+t"] + {:label "Clear in" :keys ["shift+i"] :run (constantly [::pb/clear-mark :in])} + {:label "Clear out" :keys ["shift+o"] :run (constantly [::pb/clear-mark :out])} + {:label "Tracing" :keys ["t"] :run #(vector ::ui/tracing-on (not (get-in % [:ui :tracing :on?])))} - {:label "Onion skin" :keys ["alt+o"] + {:label "Onion skin" :keys ["g"] :note "ghosts" :run #(let [on? (get-in % [:ui :onion (:clip/current %) (get-in % [:ui :open]) :on?])] [::layout/onion :on? (not on?)])}]] ["Animate" @@ -86,8 +91,8 @@ [{:label "New symbol" :keys ["n"] :run (constantly [::ui/new :inside false]) :note "in the selected symbol; in a lane, a blank drawing"} {:label "New lane" :keys ["shift+n"] :run (constantly [::ui/new :inside true])} - {:label "New symbol at the top of the tab" :keys ["alt+n"] :run (constantly [::ui/new :top false])} - {:label "New lane at the top of the tab" :keys ["alt+shift+n"] :run (constantly [::ui/new :top true])}]] + {:label "New symbol at the top of the tab" :keys ["m"] :run (constantly [::ui/new :top false])} + {:label "New lane at the top of the tab" :keys ["shift+m"] :run (constantly [::ui/new :top true])}]] ["Draw" [{:label "Select" :keys ["v"] :run (constantly [::ui/tool-key "v"])} {:label "Pen" :keys ["p"] :run (constantly [::ui/tool-key "p"])} @@ -174,7 +179,7 @@ (.addEventListener js/window "blur" #(reset! space nil))) (def ^:private glyphs - {"mod" "⌘" "alt" "⌥" "shift" "⇧" "ArrowLeft" "←" "ArrowRight" "→" + {"mod" "⌘" "shift" "⇧" "ArrowLeft" "←" "ArrowRight" "→" "ArrowUp" "↑" "ArrowDown" "↓" "Backspace" "⌫" "Escape" "Esc"}) (defn- spell [k]