How to change Photoshop’s Keyboard Shortcuts, and write an Action
A commenter here at The Web Machine has asked me to show how to change Photoshop’s Keyboard Shortcuts, which I talked about in my last post. So, since it was a request, how can I refuse. It is actually quite simple really. I’ve gathered some screen shots to walk you through it.
First, go to the Edit menu and select Keyboard Shorcuts (or Alt+Shift+Ctrl+K if you want the Keyboard Kung-Fu method). Figure 1 shows the window that will pop up. On the left hand side you sill see Application Menu Command, and under it, all the menu items in Photoshop. If you click on the arrows next to them, you will see all the sub menus under each main menu. Those sub menus will show the shortcut keys to the right, if they have one.
Figure 2, shows what it looks like when you click on one of the shortcuts that are blank, but you can click on any. The ones that I have changed myself were already set, but not to the keyboard chain that I wanted. If you click on a sub menu that has a shortcut that you want to change to something else that you prefer, just press the key(s) you want it to be. It will then give you an alert symbol next to it, and below that two buttons will appear: Accept and Go To Conflict or Undo Changes. Click Accept and Go To Conflict, which will bring you to the shortcut you are overwriting. Its a good idea to use something you will remember, but also don’t acutally use on a regular basis. Then click on Accept on the right.
Once you have done that, you can change the name of the set to whatever you want, then click the disk icon to save the set. All you have to do now, is change all the ones you want to be different or set to, and save it. Pretty damn easy.
Photoshop Tip: Arrange the windows in Photoshop to how you like them, then click on Window>Workspace>Save Workspace. This will save the arrangement so that when you open Photoshop, it will now open with all the windows in the places that you want them.
Now…onto how to write a simple action. Note, that you can do this by assigning the shortcut in the Keyboard Shortcuts, but this is just to show you how to do a simple one. An action is basically a little script that when you hit the shortcut you have assigned to it, goes and preforms all the tasks you have do for it. Onward to the how to…
First, create a new document…doesn’t matter how big or anything, we just need one opened. Create some additional layers in the layers pallet, and here comes the fun part. Click on Window>Actions, if you do not already have the window open. In the Actions pallet, click on the folder icon, and give it a name like “My Actions”. Then click on the Create New Action icon, which I show in figure 3. Name the action “Flatten Layers”. Set should be the name of the set you just created (“My Actions”), and set Function Key to F2 from the drop-down menu. Now…ready?
1. Click “Record”
2. Click on Layer>Flatten Image
3. In the Actions pallet, click the square icon (stop).
That’s it! Now every time you want to flatten an image, you just hit F2, and all the layers compress into one. Click on the folder that you created (“My Actions”), and click on the down arrow at the top of the pallet, and select Save Actions. This will save this action set for you.
Now you can go hog wild and create any crazy Action you want. You can create one that opens a new file at a certain size, or a bunch of actions that open different file sizes. I like to create actions when I have to do something in large batches, like open a file, size it down to a specific size, and save it as a different file type. That is what you use File>
Automate for. Anyway, go nuts and let me know what actions you have created!
This method returns the ancestors of each element you are matching. In the example below, it will return every ancestor until it gets to the element with an id of ‘container’. If you left the .parents() blank, it will go right up the DOM tree to the root (most likely ).