Debian Codegraph @

doc/html/macro.html

raw symbols SCIP
1 <HTML>
2 <HEAD>
3 <STYLE type="text/css">
4 H1 {color: black }
5 H2 {color: maroon }
6 H3 {color: #007090 }
7 A.head:link {color: #0060a0 }
8 A.head:visited {color: #3040c0 }
9 A.head:active {color: white }
10 A.head:hover {color: yellow }
11 A.red:link {color: red }
12 A.red:visited {color: maroon }
13 A.red:active {color: yellow }
14 </STYLE>
15 </HEAD>
16 <TITLE>Magic-7.3 Command Reference</TITLE>
17 <BODY BACKGROUND=graphics/blpaper.gif>
18 <H1> <IMG SRC=graphics/magic_title2.gif ALT="Magic VLSI Layout Tool Version 7.3">
19 <IMG SRC=graphics/magic_OGL_sm.gif ALIGN="top" ALT="*"> </H1>
20
21 <H2>macro</H2>
22 <HR>
23 Define or print a macro called char
24 <HR>
25
26 <H3>Usage:</H3>
27 <BLOCKQUOTE>
28 <B>macro</B> [<I>window_type</I>] [<I>key</I> [<I>value</I>]] <BR><BR>
29 <BLOCKQUOTE>
30 where <I>key</I> is the name of a valid key (see below), and
31 <I>value</I> is a <B>magic</B> command-line command. If
32 present, <I>window_type</I> must be one of the four window
33 types accepted by the <B>specialopen</B> command: <B>layout</B>,
34 <B>color</B>, <B>netlist</B>, and <B>wind3d</B>. If omitted,
35 the layout window is assumed by default, unless the command has
36 been called from inside a window (using the colon or semicolon
37 escape to the command-line), in which case that window type is
38 assumed.
39 </BLOCKQUOTE>
40 </BLOCKQUOTE>
41
42 <H3>Summary:</H3>
43 <BLOCKQUOTE>
44 The <B>macro</B> command translates keystrokes typed into
45 a layout window into <B>magic</B> command-line commands.
46 When the key <I>key</I> is pressed in a layout window, the
47 command stored in <I>value</I> is executed relative to that
48 layout window. The default bindings are specified in the
49 system <TT>.magic</TT> file, read at startup. These macros
50 may be arbitrarily rebound using the <B>macro</B> command. <P>
51
52 A key <B>macro</B> may be unbound from a command by
53 passing an empty string ("") for the <I>value</I>. <P>
54
55 <I>key</I> is any valid name for a keyboard keypress event.
56 In its simplest form, this may just be the name of the key,
57 such as "g" or "X". The space bar key must be quoted in
58 double-quotes; most other characters may be unquoted.
59 Control characters may be specified by the two-character
60 combination of the carat ("^") key followed by a capital
61 letter, such as "^Z". The use of embedded control characters
62 is deprecated, as it is incompatible with Tcl syntax. <P>
63
64 <I>key</I> may also be specified as any valid X11 name for
65 a key as defined in the include file <TT>keysymdef.h</TT>
66 on UNIX systems. This allows specification of function
67 keys such as "XK_F8" or keypad keys such as "XK_KP_Right". <P>
68
69 Buttons are treated just like keys for the purpose of
70 defining macros. While the official names for buttons
71 in <TT>keysymdef.h</TT> are "<B>XK_Pointer_Button1</B>",
72 etc., the <B>macro</B> command accepts the abbreviated
73 forms <B>Button1</B>, and so forth. <P>
74
75
76 Finally, key modifiers may be prepended to the key name.
77 Valid key modifiers are <B>Shift_</B>, <B>Control_</B>,
78 <B>Alt_</B>, and <B>Meta_</B>, and may be coupled in any
79 combination. Mouse buttons may also be combined with key
80 modifiers, so, for example, <B>Shift_Button1</B> is a legal,
81 unique binding. <P>
82 </BLOCKQUOTE>
83
84 <H3>Implementation Notes:</H3>
85 <BLOCKQUOTE>
86 <B>macro</B> is implemented as a built-in window command in <B>magic</B>.
87 </BLOCKQUOTE>
88
89 <H3>See Also:</H3>
90 <BLOCKQUOTE>
91 <A HREF=imacro.html><B>imacro</B></A> <BR>
92 </BLOCKQUOTE>
93
94 <P><IMG SRC=graphics/line1.gif><P>
95 <TABLE BORDER=0>
96 <TR>
97 <TD> <A HREF=commands.html>Return to command index</A>
98 </TR>
99 </TABLE>
100 <P><I>Last updated:</I> November 10, 2004 at 10:34am <P>
101 </BODY>
102 </HTML>