Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accelerators how do they work??? 1

Status
Not open for further replies.

shadow

Computer
Mar 1, 2001
321
ok in the ACAD.MNS/MNU there is a section called accelerators which from what i read in the help that
"Chapter 4 -- Custom Menus



Accelerator Keys



AutoCAD supports user-defined accelerator keys. The following is a short example of an Accelerators section.

***ACCELERATORS
ID_Line [SHIFT+CONTROL+"L"]
[CONTROL+"Q"]^C^C_quit

[CONTROL+SHIFT+"Z"]^C^Czoom extents

The Accelerators section contains items in one of two formats. The first is a name tag (such as ID_Line), followed by a label containing modifiers. The modifiers are followed by either a single-character or a special virtual key string (such as "F12") enclosed in quotation marks. This type of item maps a key sequence to a menu item. You can concatenate more than one modifier with another by using the plus symbol (+), as in the first example. When a special key sequence is recognized, the menu item associated with the name tag is executed as if the user had chosen the menu item.

The second method of defining an accelerator uses a label containing a modifier and key string, followed by a command sequence (menu macro). This method maps a key sequence to a command string and does not have a corresponding menu item. The formatting and special characters used in the menu macro are the same as those used in other menu items, except that the backslash character (\) cannot be used as the PAUSE command. If you want to make use of the backslash character, you can use the previous method for defining an accelerator to map a modifier and key string to a menu item that performs the command sequence that includes the desired pause.

The following table lists the valid modifiers.

Valid modifiers

String Description
CONTROL CTRL key
SHIFT SHIFT key, either right or left


The following table lists the special virtual keys. (These keys must be enclosed in quotation marks.)

Special virtual keys

String Description Exceptions
F1 F1 key Although the F1 key can be assigned a menu macro, this is discouraged because this key is generally associated with Help. Using a modifier with this key is acceptable.
F2 F2 key Unmodified, this toggle key switches the state of the text window.
F3 F3 key Unmodified, this key runs OSNAP.
F4 F4 key Unmodified, this toggle key switches TABMODE on or off.
F5 F5 key Unmodified, this toggle key switches ISOPLANE on or off.
F6 F6 key Unmodified, this toggle key switches COORDS on or off.
F7 F7 key Unmodified, this toggle key switches GRIDMODE on or off.
F8 F8 key Unmodified, this toggle key switches ORTHOMODE on or off.
F9 F9 key Unmodified, this toggle key switches SNAPMODE on or off.
F10 F10 key Unmodified, this toggle key switches Polar Tracking on or off.
F11 F11 key Unmodified, this toggle key switches Object Snap Tracking on or off.
F12 F12 key None
INSERT INS key None
DELETE DEL key None
ESCAPE ESC key Although the ESC key can be assigned a menu macro, it is discouraged because this key is generally associated with Cancel.
CONTROL+ESCAPE and CONTROL+SHIFT+ESCAPE cannot be assigned a menu macro; these sequences are controlled by Windows.
Using the SHIFT modifier with this key is acceptable.
UP key Must be used with the CONTROL modifier.
DOWN key Must be used with the CONTROL modifier.
LEFT key Must be used with the CONTROL modifier.
RIGHT key Must be used with the CONTROL modifier.
NUMPAD0 0 key None
NUMPAD1 1 key None
NUMPAD2 2 key None
NUMPAD3 3 key None
NUMPAD4 4 key None
NUMPAD5 5 key None
NUMPAD6 6 key None
NUMPAD7 7 key None
NUMPAD8 8 key None
NUMPAD9 9 key None


Users who make extensive use of coordinate entry, might find the following menu enhancement very useful.

["NUMPAD5"]@x^h
[&quot;NUMPAD6&quot;]<0
[&quot;NUMPAD9&quot;]<45
[&quot;NUMPAD8&quot;]<90
[&quot;NUMPAD7&quot;]<135
[&quot;NUMPAD4&quot;]<180
[&quot;NUMPAD1&quot;]<-135
[&quot;NUMPAD2&quot;]<-90

[&quot;NUMPAD3&quot;]<-45

If this code is added to the Accelerators section, your numeric keypad is modified as follows: the ENTER key enters the @ symbol and the other number keys enter the less-than symbol (<), followed by the angular value represented by its location in the keypad. For example, if you wanted to draw a square that was 3 units on each side, you would enter the following:

Command: line
From point: (specify start point)
To point: (press number 5) 3 (press number 6)
To point: (press number 5) 3 (press number 2)
To point: (press number 5) 3 (press number 4)

To point: c &quot;

but could this mean for me that i could set an autocad button macro that emmulates just the CTRL+R feature ???

if someone could peleas explain this to me a little better i would deaply appreaciate it if everyone helps everybody the world will be a better place
 
Replies continue below

Recommended for you

Shadow,

There are two ways (that I know of) to solve this problem:

I responded to your March 15 post &quot;Toggle Between Multiple Viewports&quot; and gave a LISP routine which does this. I believe this routine is better than the Contol-R method because it can initiate the viewport toggle from either paper space or model space, while Contol-R only works when in model space. However, if you would prefer to use accelerators you can simply put ^v in the button macro to get the same behaviour as Control-R.

 
thats great cause it means you dont have to us a lisp routine to do it but i would still like to know more about accelerators cause i can see how they might be useful in other areas

what is an acelerator exactly
i understand its the keyboard combo to initiate a command but where all can you use them how are they initiated can you use them form the command line
these are the kinds of questions i have
thanks again Stoker if everyone helps everybody the world will be a better place
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor