• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
3

looking for a way to toggle group/layer selection

Participant ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Is there a way to set up a keyboard shortcut or an existing modifier for the Group/Layer selection?

Screenshot 2023-11-14 at 12.12.09 PM.jpg

TOPICS
macOS

Views

131

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 Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

An Action can play the selection of a tool preset, but it may fail if the tool preset is set to "current tool only" and the move tool isn't selected. Also, the only keyboard shortcuts are Functin F-key based. So actions have limitiations.

 

Scripts offer more flexibility. There might be a way to directly script this with arcane AM code, however, I don't know about that.

 

What I do know is that you can create two named presets for the move tool,  such as "Move Tool - Group" and 

"Move Tool - Layer" for example, then indirectly reference these presets in a script and then set a custom keyboard shortcut against each installed script.
 
2023-11-15_12-41-45.png
 
// Select 'Move Tool - Group' Preset

#target photoshop

(r = new ActionReference()).putClass(stringIDToTypeID('moveTool'));
(d = new ActionDescriptor()).putReference(stringIDToTypeID('target'), r);
executeAction(stringIDToTypeID('select'), d, DialogModes.NO);

selectMoveToolPreset("Move Tool - Group");

function selectMoveToolPreset(thePresetName) {
	function s2t(s) {
		return app.stringIDToTypeID(s);
	}
	var descriptor = new ActionDescriptor();
	var reference = new ActionReference();
	reference.putName( s2t( "toolPreset" ), thePresetName );
	descriptor.putReference( s2t( "null" ), reference );
	executeAction( s2t( "select" ), descriptor, DialogModes.NO );
}

 

And:

 

// Select 'Move Tool - Layer' Preset

#target photoshop

(r = new ActionReference()).putClass(stringIDToTypeID('moveTool'));
(d = new ActionDescriptor()).putReference(stringIDToTypeID('target'), r);
executeAction(stringIDToTypeID('select'), d, DialogModes.NO);

selectMoveToolPreset("Move Tool - Layer");

function selectMoveToolPreset(thePresetName) {
	function s2t(s) {
		return app.stringIDToTypeID(s);
	}
	var descriptor = new ActionDescriptor();
	var reference = new ActionReference();
	reference.putName( s2t( "toolPreset" ), thePresetName );
	descriptor.putReference( s2t( "null" ), reference );
	executeAction( s2t( "select" ), descriptor, DialogModes.NO );
}

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Votes

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
Participant ,
Dec 08, 2023 Dec 08, 2023

Copy link to clipboard

Copied

Thanks a lot. That is heavy code knowledge but I will try it. 

Votes

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 Expert ,
Dec 08, 2023 Dec 08, 2023

Copy link to clipboard

Copied

@Mr. Content 

 

Let me know how you go. After almost a month, I thought that this was a hit-and-run topic and that you wouldn't be back!

Votes

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
Participant ,
Dec 27, 2023 Dec 27, 2023

Copy link to clipboard

Copied

LATEST

I tried this but my acute allergies to code flared up and I just decided to live with it the way it is. Sorry so slow in informing you. 

Votes

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