Join Todd Perkins for an in-depth discussion in this video Creating custom keyboard shortcuts, part of Flash CS3 Professional Beyond the Basics.
- View Offline
Now we'll look at creating custom keyboard shortcuts in Flash. If you're following along, I'm working in the O2_Keyboard_Shortcuts.fla in the chapter 1 folder in the exercise files folder. You can also just open up a blank document. Before we talk about creating custom keyboard shortcuts, let's talk about why you'd want to do that. One of reasons it's good to create custom keyboard shortcuts, is that often you can run a command faster through a keyboard shortcut than by choosing a menu command. Some commands that you use often don't have a keyboard shortcut built into Flash.
For example, if you go to File, Import, Import to Library or Import Video, notice that Flash doesn't display any keyword shortcuts for those commands. So let's create them now. On the Mac, choose Flash, Keyboard Shortcuts. On the PC, it's Edit, Keyboard Shortcuts. The first thing you need to do to create a custom keyboard shortcut is duplicate a keyboard shortcut set. You can duplicate a set by clicking the Duplicate Set button at the top of the Keyboard Shortcuts window.
So with the Current set Adobe Standard selected, I'm going to click the Duplicate Set button. Now I'll choose a name for my Keyboard Shortcuts set. I'm going to call this Todd's Custom Keys, and then I'll click OK. Now I have my custom keys, you can see at the top of the Keyboard Shortcuts window that the Current set is Todd's Custom Keys. And now what I'll do is under Commands in the window I'm going to choose File and then I'm going to select Import, and click the arrow to expand the Import option, and then I'm going to select Import to Library.
Now to create a Keyboard Shortcut, you need to click the Plus button or the Add Shortcut button in the Shortcuts section, and then in the Press key section, press the keyboard shortcut that should like to create for that option. For Import to library I'm going to choose Shift+Command+Option+I. Now the equivalent of that on the PC would be Shift+Ctrl+Alt+I. After you've created that keyboard shortcut, click the Change button, and notice the Shortcuts section updates, as well as the area in the middle of the Keyboard Shortcuts window.
See that there is now a Keyboard Shortcut for Import to Library. Let's do the same thing for Import Video. Select Import Video, click the Plus button to add a shortcut, and then press the keyboard shortcut that you want use to import video. I'm going to press Command+V. On the PC the keyboard shortcut is Ctrl+V. Notice at the bottom of the Keyboard Shortcuts window, Flash tells you: This shortcut is already assigned to the "Paste" command. So sometimes when you want to create a keyboard shortcut you'll find that keyboard shortcut is already taken. Then you can create another keyboard shortcut. Let's try Shift+Option+Command+M, and here we could say M is for movie.
On the PC, the equivalent keyboard shortcut would be Ctrl+Alt+Shift+M. And once that's acceptable, you can click the Change button. Notice the keyboard shortcut updates. Now let's click the OK button at the bottom right of the Keyboard Shortcuts window to accept our changes. Now let's see our keyboard shortcuts in action. I'm going to press Shift+Option+Command and then I, to open up the Import to Library window. Over on the PC the keyboard shortcut for that is Shift+Alt+Ctrl+I, and the Import to Library window opens. I'm going to click the Cancel button to close the window. Now let's see if we can open the Import Video menu using the keyboard shortcut we created.
On the Mac that's Shift+Option+Command+M. On the PC it's Shift+Alt+Ctrl+M. Then you can see the Video Import Wizard or the Import Video menu. I'm going to click Cancel to close the Import Video menu, and there's a look at creating keyboard shortcuts. Now sometimes you may want to delete or modify your keyboard shortcuts. I'll show you how to do that right now. Choose Flash, Keyboard Shortcuts on the Mac, or Edit, Keyboard Shortcuts on the PC to open up the Keyboard Shortcuts window. Let's talk about changing a keyboard shortcut set first. My Current set is Todd's Custom Keys.
Let's say I don't need the word Custom in there. I just want to call it Todd's Keys, that's descriptive enough. So what I'm going to do is click the Rename Set button at the top right of the Keyboard Shortcuts window. I'm going to erase the word Custom so it just says Todd's Keys, and then I'm going to click OK. You can see that the current set is updated in the Keyboard Shortcuts window. Now let's take a look at deleting a keyboard shortcut set. To delete a keyboard shortcut set, click the Delete Set button at the top right of the Keyboard Shortcuts window, select the set you want to delete, I'm going to delete the Todd Keyes set, and then click the Delete button.
And now when I try to select the Current set, I don't have the option to choose Todd's Keys. I'm going to select Adobe Standard, to go back to the standard Adobe keyboard shortcut set and then click OK. And there's a look at creating custom keyboard shortcuts.
- Customizing Flash CS3 and managing assets Working with ActionScript variables Understanding dynamic text fields Adding interactivity to dynamic text Animating a complex MovieClip Using buttons to navigate labeled frames Working with components Exploring advanced audio and video techniques Creating accessible Flash content Understanding Flash Mobile