Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new animation editor keyboard shortcuts #10348

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

riknoll
Copy link
Member

@riknoll riknoll commented Jan 23, 2025

this tweaks a lot of existing shortcuts and adds a few more that are specific to the animation editor. all of the shortcuts that are affected by the marquee tool can now be combined with the shift key to affect all animation frames at the same time. for example:

new-anim-shortcuts

look at the timeline in that GIF to see all of the frames editing at once.

this also means that all of the shortcuts that were previously tied to uppercase letters have now been moved to the lowercase versions of those letters. the shifted versions will still work, but will affect all frames in animations. they are unchanged in the image/tilemap editor. also the pan tool shortcut was moved from h to q so as not to conflict with the horizontal flip shortcut. this breaks from the standard set by most image editors for pan, but i'm guessing most people use the spacebar anyhow.

finally, two new shortcuts were added for advancing the animation frame forwards and backwards

@riknoll riknoll requested a review from a team January 23, 2025 01:06
@riknoll
Copy link
Member Author

riknoll commented Jan 23, 2025

todo: make the page up and page down keys move the current animation frame up and down in the timeline

Copy link
Contributor

@srietkerk srietkerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple small suggestions, LGTM!

webapp/src/components/ImageEditor/keyboardShortcuts.ts Outdated Show resolved Hide resolved
webapp/src/components/ImageEditor/keyboardShortcuts.ts Outdated Show resolved Hide resolved
export function advanceFrame(forwards: boolean) {
const state = store.getState();

if (state.editor.isTilemap) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check if it's the image editor as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what the frames length check does! the image editor uses the same state as the animation editor, it just has only one frame

@riknoll riknoll merged commit 48e25e0 into master Jan 23, 2025
6 checks passed
@riknoll riknoll deleted the dev/riknoll/new-animation-shortcuts branch January 23, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants