Keyboard shortcut for moving up or down a layer in timeline?

Community Beginner ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

Does anyone know of a way to navigate between layers in the timeline with keyboard shortcuts? I know the ways to more "horizontally" with "," and "." but would like to be able to navigate "vertically" with the keyboard as well.

Views

67

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

Hi.

 

There are no default shortcuts for moving layers up and down in a timeline as far as I can tell. But you can create JSFL scripts for theses taks and assign shortcuts to them.

 

Here I have two scripts that you can assign to two different shortcuts to reorder the layers up and down:

 

Move Current Layer Up.jsfl

function main()
{
	var dom = fl.getDocumentDOM();

	if (!dom)
	{
		alert("Please open up a document first.");
		return;
	}

	var timeline = dom.getTimeline();
	timeline.reorderLayer(timeline.currentLayer, Math.max(0, timeline.currentLayer - 1));
}

main();

 

Move Current Layer Down.jsfl

function main()
{
	var dom = fl.getDocumentDOM();

	if (!dom)
	{
		alert("Please open up a document first.");
		return;
	}

	var timeline = dom.getTimeline();
	timeline.reorderLayer(timeline.currentLayer, Math.min(timeline.layers.length - 1, timeline.currentLayer + 1), false);
}

main();

 

1 - You can just copy and paste the scripts in any text editor and save the files with the .jsfl extension or just grab the files from the link below [1];

 

2 - Place them in the Commands folder:

 

Windows:

<boot device>\Users\<user>\AppData\Local\Adobe\Animate <version>\<lang>\Configuration\Commands

 

E.g.:

C:\Users\joaoc\AppData\Local\Adobe\Animate 2021\en_US\Configuration\Commands

 

3 - Then go to Edit > Keyboard Shortcuts and assign shortcuts for the two scripts that should be listed under Commands. In my test scenario, I assigned Ctrl + Shift + Alt + Arrow Up for moving the current layer up and Ctrl + Shift + Alt + Arrow Down for moving the current layer down.

 

JSFL files / code / source [1]:

https://github.com/joao-cesar/adobe/tree/master/animate%20cc/jsfl/reorder_layers

 

More infos about commands here:

https://helpx.adobe.com/animate/using/automating-tasks-commands-menu.html

 

I hope these help.

 

Regards,

JC

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 07, 2020 Dec 07, 2020

Copy link to clipboard

Copied

LATEST

Thanks for this. I mean just changing focus rather than reordering layers but I'll keep this in mind as well. 

Many thanks!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines