Redefining The F1 Key
1 The Problem: Has this ever happened to you?
You're working away like mad in AutoCAD or one of its flavors and all of a sudden, when you thought you hit the Esc key, you find Help starting to load because you accidently pressed the nearby F1 key.
On many keyboards, particularly those for Laptop computers, the Esc key and the F1 key are so close that hitting the F1 key by accident is a common event that invokes the AutoCAD Help menu. In this short article we'll change the F1 key to act like Esc (or Cancel ) so this won't bother you ever again.
2 The Solution: AutoCAD Menu Keyboard Accelerators
Within the default AutoCAD menu, you will find a set of keyboard shortcut keys that allow for such common Windows-like actions as "Cut", "Clip" and "Paste". By using the very same code that allows for these actions to be accomplished, you can redefine the F1 key so that it no longer brings up the Help Window.
Illustrated to the right I show how you can quickly find the Accelerators section of the default AutoCAD menu (acad.mns) by using the Find dialog box.
Note: When doing this editing, make sure you select and edit acad.mns and not the acad.mnu just under it (in the Support folder) unless you intend to recompile the acad.mnu file (not reccomended for those new to customising).
The acad.mns file typically resides within the Support folder under the AutoCAD, Mechanical Desktop, Architectural Desktop or other Autocad family product's equivalent folder. Be sure when browsing for the acad.mns file that you first select 'All Files' in 'Files of type:' or otherwise you will only see folders and the files that have your editors default extension (typically .txt or .doc).
When you edit the acad.mns file, make sure to use a simple ASCII character editor like Notepad or Wordpad and make sure that when you save the file it is saved in the same .mns extension. This is not a problem if you have just done a File->Open and then eventually a File->Save because it will save back down with the same extension. But if for any reason you decide to use File->Save As be sure to select 'All Files' in the Files of type:' and type in the .mns extension yourself. This ensures that the extension is not changed to the editors default (.txt, .doc or .html or whatever) which is unrecognizable by AutoCAD. Just typing the extension .mns alone is not enough without selecting 'All Files' because Microsoft will just add (say) a .txt on the end giving you acad.mns.txt. After you discover this has happened you can just rename the file as acad.mns rather than trying to re-save correctly. Happens to me periodically and I'm suppose to have a clue.
Redefining the F1 key
To redefine the "F1" key, type the following under any of existing accelerator lines:
["F1"]^C^C
If you wish to maintain some sort of keyboard access to the Help Window, you can define another keyboard key combination such as Ctrl + F1. To define the Ctrl + F1 key, type the following under any of the existing accelerator lines:
[Control+"F1"]'Help
Put the additional lines the first to appear under Accelerators as shown in the code snippet so they are the first thing you or anyone else sees. Note the Comment lines preceeded by the ;'s which are ignored by AutoCad but draw attention to the changes made, and in the example, include the name of the author who should keep their own copies of such changed files so that after a new install or re-install the cutomiled files can be re-added.
When done, save the file and reload AutoCAD or Architectural Desktop to check the new keyboard accelerators.
What Next?
Well you could leverage what we have practiced so far and look long and hard at some of the other Function buttons.
I drive AutoCad/Mechanical Desktop (A2000/MDT4 and A2002/MDT6 ..we skipped A2000i/MDT5!) and I know that F12 in untasked, F6 turns screen co-ordinates ON/OFF (I've never conciously turned them off! Have you?) and a couple of the others that could be used for more useful purposes.
All the mechanics of customising Function buttons have been dealt with and all need to do is settle on a line of code to use like our:
["F1"]^C^C
Say:
["F6"]'_3dorbit
Why 3D Orbit? Well there probably could be better choices but I do a bit of part modelling and while I can zoom and pan ok pecking and slapping with my left hand (ie z slap or z slap slap ..where slap means 'Press Spacebar') or, shock-horror, using the right mouse button the truth is the alias out of the box, 3DO is not nice. Left hand pecking the 3 and the D is fine but moving over to the O and flicking your eyes off what you are drawing to locate it knocks productivity only slightly less than than taking the your eyes and the cursor off the job to click on a button at the top of the screen and then come back searching for where you where. The next step will be the door or be put on the Inventor seat.
I would really like to have anther alias other than 3DO to issue the 3dorbit command and 3dc leads naturally onto the spacebar for left handed typing while oo is index finger two pecks on the same key and, for me, has the advantage of fitting in with a Mechanical desktop alias in the mcad.pgp that I use a lot. So I could put both in the acad.pgp file like:
3dc, *3dorbit
3dc, *3dorbit
And better late than never, an alias that opens MS Notepad:
np, start notepad, 1,,
o0o