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 <noreply@anthropic.com>
This commit is contained in:
parent
af0df98a15
commit
ea2becf4c7
2 changed files with 18 additions and 9 deletions
|
|
@ -135,8 +135,12 @@
|
||||||
:out (assoc marks :out (cond-> f in (max in))))))))
|
:out (assoc marks :out (cond-> f in (max in))))))))
|
||||||
|
|
||||||
(rf/reg-event-db
|
(rf/reg-event-db
|
||||||
::clear-marks
|
::clear-mark
|
||||||
(fn [db _] (update-in db [:playback :range] dissoc (get-in db [:ui :open]))))
|
;; ⇧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
|
(rf/reg-event-fx
|
||||||
::set-rate
|
::set-rate
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,11 @@
|
||||||
THE KEYS ARE BLENDER'S, then Resolve's, then Flash's and Harmony's. WASD repeats the arrows
|
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
|
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
|
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]
|
(:require [arthur.events.history :as history]
|
||||||
[arthur.events.playback :as pb]
|
[arthur.events.playback :as pb]
|
||||||
[arthur.events.ui :as ui]
|
[arthur.events.ui :as ui]
|
||||||
|
|
@ -67,10 +71,11 @@
|
||||||
{:label "Mark in" :keys ["i"] :run (constantly [::pb/mark :in])
|
{:label "Mark in" :keys ["i"] :run (constantly [::pb/mark :in])
|
||||||
:note "playback loops between the marks"}
|
:note "playback loops between the marks"}
|
||||||
{:label "Mark out" :keys ["o"] :run (constantly [::pb/mark :out])}
|
{:label "Mark out" :keys ["o"] :run (constantly [::pb/mark :out])}
|
||||||
{:label "Clear the marks" :keys ["alt+x"] :run (constantly [::pb/clear-marks])}
|
{:label "Clear in" :keys ["shift+i"] :run (constantly [::pb/clear-mark :in])}
|
||||||
{:label "Tracing" :keys ["alt+t"]
|
{: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?])))}
|
: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?])]
|
:run #(let [on? (get-in % [:ui :onion (:clip/current %) (get-in % [:ui :open]) :on?])]
|
||||||
[::layout/onion :on? (not on?)])}]]
|
[::layout/onion :on? (not on?)])}]]
|
||||||
["Animate"
|
["Animate"
|
||||||
|
|
@ -86,8 +91,8 @@
|
||||||
[{:label "New symbol" :keys ["n"] :run (constantly [::ui/new :inside false])
|
[{:label "New symbol" :keys ["n"] :run (constantly [::ui/new :inside false])
|
||||||
:note "in the selected symbol; in a lane, a blank drawing"}
|
: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 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 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 ["alt+shift+n"] :run (constantly [::ui/new :top true])}]]
|
{:label "New lane at the top of the tab" :keys ["shift+m"] :run (constantly [::ui/new :top true])}]]
|
||||||
["Draw"
|
["Draw"
|
||||||
[{:label "Select" :keys ["v"] :run (constantly [::ui/tool-key "v"])}
|
[{:label "Select" :keys ["v"] :run (constantly [::ui/tool-key "v"])}
|
||||||
{:label "Pen" :keys ["p"] :run (constantly [::ui/tool-key "p"])}
|
{:label "Pen" :keys ["p"] :run (constantly [::ui/tool-key "p"])}
|
||||||
|
|
@ -174,7 +179,7 @@
|
||||||
(.addEventListener js/window "blur" #(reset! space nil)))
|
(.addEventListener js/window "blur" #(reset! space nil)))
|
||||||
|
|
||||||
(def ^:private glyphs
|
(def ^:private glyphs
|
||||||
{"mod" "⌘" "alt" "⌥" "shift" "⇧" "ArrowLeft" "←" "ArrowRight" "→"
|
{"mod" "⌘" "shift" "⇧" "ArrowLeft" "←" "ArrowRight" "→"
|
||||||
"ArrowUp" "↑" "ArrowDown" "↓" "Backspace" "⌫" "Escape" "Esc"})
|
"ArrowUp" "↑" "ArrowDown" "↓" "Backspace" "⌫" "Escape" "Esc"})
|
||||||
|
|
||||||
(defn- spell [k]
|
(defn- spell [k]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue