mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-11 16:33:01 -06:00
Shortcuts: Cmd+Left / Cmd+Right Arrow step a frame
Previous / Next Frame also answer to Cmd+Left / Cmd+Right Arrow, and Back / Forward 10 Frames to Cmd+Shift+Left / Right, next to the Page keys (After Effects' second default keys). A command spec can now list several default shortcuts (`alt_shortcuts`, `cmd!(…, ["PageDown", "Cmd+ArrowRight"], …)`); menus and tooltips keep showing the first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a7d3e7699
commit
88bf89ea5d
@@ -333,6 +333,24 @@ fn defaults_have_no_conflicts_and_match_the_menus() {
|
||||
assert!(t.bindables.len() > 500);
|
||||
}
|
||||
|
||||
/// Cmd+Left / Cmd+Right Arrow step a frame like Page Up / Page Down (Shift: 10 frames).
|
||||
#[test]
|
||||
fn cmd_arrows_step_frames_like_page_keys() {
|
||||
let s = Session::default();
|
||||
let t = s.shortcuts();
|
||||
for (id, keys) in [
|
||||
("time.nextFrame", ["PageDown", "Cmd+ArrowRight"]),
|
||||
("time.previousFrame", ["PageUp", "Cmd+ArrowLeft"]),
|
||||
("time.forward10", ["Shift+PageDown", "Cmd+Shift+ArrowRight"]),
|
||||
("time.back10", ["Shift+PageUp", "Cmd+Shift+ArrowLeft"]),
|
||||
] {
|
||||
assert_eq!(t.keys.get(id).map(Vec::as_slice), Some(keys.map(String::from).as_slice()), "{id}");
|
||||
// The menus and tooltips keep showing the Page key.
|
||||
assert_eq!(t.shortcut_of(id, &json!(null)), Some(keys[0]));
|
||||
}
|
||||
assert!(t.all_conflicts().is_empty(), "{:?}", t.all_conflicts());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shortcut_edits_detect_conflicts_and_create_a_custom_preset() {
|
||||
let store = Arc::new(MemoryConfig::default());
|
||||
|
||||
Reference in New Issue
Block a user