Circles and Lines: Taking CUI One Step Further15 Nov, 2005 By: Lynn Allen Cadalyst
Create CUI shortcuts for your mouse buttons, keyboard commands and function keys.
Last month we delved ever so lightly into the new CUI (Customization User Interface) command; this month we'll dive just a little bit deeper. As mentioned, the new CUI is a one-stop shop for customizing just about everything inside of AutoCAD except for the tool palettes. CUI will also make it easy for you to upgrade to future releases of AutoCAD because your customization changes will practically migrate automatically (which will make all of us quite happy!).
Commands at the Click of a Mouse
Almost all of us are mouse addicts nowadays -- we use the wheel to zoom and pan like crazy. Did you also know that you can assign commands to the right mouse button? By default the right mouse button executes the shortcut menus -- which is good; we don't want to change that. But you can also control what happens when you hold down the Shift key and right-click, the Control key and right-click, and the Shift+Control key and right-click. The latter is only for those of you who are very coordinated!
In the CUI command you'll find the Mouse Buttons section (figure 1). As I mentioned, you probably want to leave the default right-click setting alone. And if you're using a Shift and right-click to execute your object snap menu, then you won't want to change that setting either. But why not assign a command to a Control and right-click or a Shift+Control right-click? It's fast, easy and places two frequently used commands at your fingertips (literally).
Figure 1. Use the Mouse Buttons section to customize your input device.
As you enter the CUI command, you'll find that the Object Snap menu is assigned to both Shift and Control + the second button by default. Let's change one of these settings to something more valuable to us. Expand the Ctrl+Click section of Menu Buttons. Now think of your most frequently used command (Layer? Undo? Erase?). For our purposes we'll assign the Layer command to the Ctrl and right-click combination.
In the lower left corner of the CUI dialog box, you'll find nearly all of the AutoCAD commands (and then some). . Key in the first letter of the command, and AutoCAD jumps down to all the commands beginning with that character. This method will spare you a little extra scrolling, which is always appreciated. After finding your command in the list, simply drag the command to Button 2 (figure 2).
Figure 2. After selecting a command, simply drag it into place under Ctrl+Click.
Now select another favorite command and drag it to the Button 2 slot in the Ctrl+Shift+Click section. Click OK to exit the dialog box and try your new improvements. Control and right-click should execute the first command you assigned and Control+Shift and right-click should execute the second. Now you have two powerful commands at your fingertips for easy access.
If you have more than two buttons on your input device, you can assign commands to those buttons using the exact same procedure. For each extra button, you can assign four commands. So if you have a four-button puck (from the old tablet days), you have three buttons you can assign commands to (remember that the pick button is not customizable). So that's 12 additional commands!
Let's move on to keyboard shortcuts. If you're still typing in the AutoCAD commands like I am, then you can certainly appreciate setting up your keyboard for maximum efficiency. You used to customize keyboard commands in the Accelerators section of the menu file, but for the past few releases it's been fairly easy to do graphically. For those of you using AutoCAD 2004 and AutoCAD 2005, you can use the Customize command to assign your keyboard keys.
Expand the Keyboard Shortcuts section (figure 3). On the right side of the CUI dialog box, you'll see a listing of all the previously assigned shortcut keys. You just might find some shortcuts that are news to you! If you don't need or don't care for some assignments, there's nothing to keep you from overriding them with your own preferred setup. For those of you who are die-hard Control+C to cancel fans, this is the magical place to switch it from Copyclip to Cancel.
Figure 3. Use the Keyboard Shortcuts section of the CUI to customize your keyboard keys.
Making Function Keys Functional
Do you use all of your function keys? I bet you don't, and yet they are so easy to get to. I suggest assigning your frequently used commands to the function keys you no longer use, perhaps F5, F6 and F7. I'm an Autodesk Inventor user, and I am addicted to using F5 for Zoom Previous. Let's follow the steps that would be required to get that same functionality in AutoCAD.
Find Zoom Previous in the command list in the lower left corner of the CUI dialog box. Simply drag and drop it to the Shortcuts section. In the lower right corner you'll see the information assigned to Zoom Previous. Notice that the Key(s) section is blank. To the right of this cell, you'll find the typical ellipsis, indicating a dialog box will appear when selected. Do exactly that and you'll find the Shortcut Key dialog box appears (figure 4). Simply hit the F5 key on your keyboard and click Assign -- it's that easy! Select OK to exit this dialog box and another OK to exit the CUI, and try your F5 key. You'll find that it's now executes a Zoom Previous.
Figure 4. The Shortcut Key dialog box can reassign commands to your function keys.
Should you want to put Control+C back to Cancel, simply drag Cancel from the command list into the shortcuts section and follow the same procedure. When prompted for a shortcut hold down the Control key and the C key. You'll get this friendly little message (figure 5) that let's you know Control+C is already assigned. Notice that the order of the commands in the tree view determines priority. Since AutoCAD reads the menu files from top to bottom, those items at the end of the list have priority. No problem, simply drag your newly added shortcut to the end of the list.
Are you tired of hitting F1 accidentally when you were aiming for Escape? There's nothing to keep you from reassigning F1 to Cancel (Escape) to avoid the aggravation!
Note: Even though F5 already had a command assignment, you'll notice that we didn't get the same message. Some commands are hard-coded into AutoCAD and consequently don't appear in this list (but that won't keep you from overriding them).
Figure 5. AutoCAD will let you know if a key is already assigned to a different command.
For those of you who are true menu customizers, you'll find that not all of the functionality from the Accelerators section was included in the CUI (bummer). You can't configure the arrow keys, Delete, Insert, Esc, etc., just to name a few. Yes, you can actually change the functionality of the Esc key in the AutoCAD menu file! But most of the functionality is there, and it's so much easier to get to.
So we took another step deeper into the CUI -- next month we'll continue down our journey until you are all experts! Until next month -- Happy AutoCAD-ing!