blob: 1b502dba4a07671b454f282ad2507315524b9bcb [file] [log] [blame]
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001#
2# Cadence-compatibility bindings except where marked.
3#
4macro f "view" ;# zoom to fit window
5macro ^z "zoom 0.5" ;# zoom in
6macro Z "zoom 2" ;# zoom out
7macro B "popstack" ;# up hierarchy
8macro X {pushstack [cellname list self]} ;# down hierarchy
9macro x "edit" ;# down hierarchy, edit-in-place
10macro b "select top cell ; edit" ;# up hierarchy from edit-in-place
11macro p "tool wire; magic::trackwire %W pick" ;# path
12macro ^r "redraw"
13macro ^f "unexpand"
14macro F "expand"
15macro ^a "select area"
16macro ^d "select clear"
17macro k "magic::measure"
18macro K "magic::unmeasure"
19macro i "magic::promptload getcell"
20macro l "magic::update_texthelper ; wm deiconify .texthelper ; raise .texthelper"
21macro O "magic::clock"
22macro <del> "magic::delete"
23
24# Toolkit parameter dialog
25macro q "magic::gencell {} ; raise .params"
26#
27# The following should be already implemented as existing Magic bindings
28#
29macro u "undo"
30macro U "redo"
31macro m "move"
32macro c "copy"
33#
34# Compatibility with Electric; Cadence bindings are on function keys and
35# do not work through the VNC.
36macro ^s "magic::promptsave magic" ;# save dialog menu
37
38#
39# Bertrand's bindings follow except where marked.
40#
41macro < sideways
42macro ^ upsidedown
43#
44# Set grid at 1 micron
45#
46macro 0 "grid on ; grid 1l" ;# Grid at 0.5um (1 lambda)
47# macro ^f "feedback clear" ;# conflicts with Cadence binding
48#
49# Paint/Erase macros
50#
51macro 1 "paint m1"
52macro ! "erase m1"
53macro 2 "paint m2"
54macro @ "erase m2"
55macro 3 "paint m3"
56macro # "erase m3"
57#ifdef METAL4
58macro 4 "paint mtp"
59macro $ "erase mtp"
60#endif
61#ifdef METAL5
62macro 4 "paint m4"
63macro $ "erase m4"
64macro 5 "paint mtp"
65macro % "erase mtp"
66#endif
67#ifdef METAL6
68macro 4 "paint m4"
69macro $ "erase m4"
70macro 5 "paint m5"
71macro % "erase m5"
72macro 6 "paint mtp"
73macro ^ "erase mtp"
74#endif
75
76macro 7 "paint poly"
77# macro & "erase poly"
78# macro p "paint pdiff"
79macro n "paint ndiff"
80# macro l "erase labels"
81macro P "erase pdiff"
82macro N "erase ndiff"
83macro y "drc check; drc why"
84macro ? "select area; what"
85
86macro / "expand toggle"
87macro ^w "writeall force"
88macro ^e "edit"
89# macro ^x "quit"
90
91macro z "findbox zoom"
92# "f" conflicts with Cadence "full view", so use control-i to select cells.
93# macro f "select cell"
94macro ^i "select cell"
95
96# Leave keypad bindings as-is, further down. However, keypad
97# keys generally don't translate through the VNC session, so
98# use the following arrow key bindings:
99#
100# no shift shift
101# arrows only -> Pan 10% 100%
102# with alt -> Move 1 lambda 1 grid
103# with ctrl -> Stretch 1 lambda 1 grid
104#
105# Pan 10 percent of the window size with arrows
106# macro XK_Left "scroll l .1 w"
107# macro XK_Up "scroll u .1 w"
108# macro XK_Right "scroll r .1 w"
109# macro XK_Down "scroll d .1 w"
110
111# Pan 100 percent of the window size with arrows
112# macro Shift_XK_Left "scroll l 1 w"
113# macro Shift_XK_Up "scroll u 1 w"
114# macro Shift_XK_Right "scroll r 1 w"
115# macro Shift_XK_Down "scroll d 1 w"
116
117# move 0.05um with arrows
118# macro Alt_XK_Left "move l 1l"
119# macro Alt_XK_Right "move r 1l"
120# macro Alt_XK_Up "move u 1l"
121# macro Alt_XK_Down "move d 1l"
122
123# move 1 grid unit with arrows
124# macro Alt_Shift_XK_Left "move l 1g"
125# macro Alt_Shift_XK_Right "move r 1g"
126# macro Alt_Shift_XK_Up "move u 1g"
127# macro Alt_Shift_XK_Down "move d 1g"
128
129# stretch 0.05um with arrows
130# macro Control_XK_Left "stretch l 1l"
131# macro Control_XK_Right "stretch r 1l"
132# macro Control_XK_Up "stretch u 1l"
133# macro Control_XK_Down "stretch d 1l"
134
135# stretch 1 grid unit with arrows
136# macro Control_Shift_XK_Left "stretch l 1g"
137# macro Control_Shift_XK_Right "stretch r 1g"
138# macro Control_Shift_XK_Up "stretch u 1g"
139# macro Control_Shift_XK_Down "stretch d 1g"
140
141# shift mouse wheel bindings for right-left shift
142macro Shift_XK_Pointer_Button4 "scroll r .05 w"
143macro Shift_XK_Pointer_Button5 "scroll l .05 w"
144
145# control mouse wheel bindings for zoom in/out
146macro Control_XK_Pointer_Button4 "zoom 0.70711"
147macro Control_XK_Pointer_Button5 "zoom 1.41421"
148
149# Bertrand's original arrow macros
150# move 1 grid unit with arrows
151macro XK_Left "move l 1g"
152macro XK_Right "move r 1g"
153macro XK_Up "move u 1g"
154macro XK_Down "move d 1g"
155
156# move 0.05um with arrows
157macro Control_XK_Left "move l 1l"
158macro Control_XK_Right "move r 1l"
159macro Control_XK_Up "move u 1l"
160macro Control_XK_Down "move d 1l"
161
162# stretch 1 grid unit with arrows
163macro Shift_XK_Left "stretch l 1g"
164macro Shift_XK_Right "stretch r 1g"
165macro Shift_XK_Up "stretch u 1g"
166macro Shift_XK_Down "stretch d 1g"
167
168# stretch 0.05um with arrows
169macro Control_Shift_XK_Left "stretch l 1l"
170macro Control_Shift_XK_Right "stretch r 1l"
171macro Control_Shift_XK_Up "stretch u 1l"
172macro Control_Shift_XK_Down "stretch d 1l"
173
174# Restore pan function on Alt-key
175# Pan 10 percent of the window size with arrows
176macro Alt_XK_Left "scroll l .1 w"
177macro Alt_XK_Up "scroll u .1 w"
178macro Alt_XK_Right "scroll r .1 w"
179macro Alt_XK_Down "scroll d .1 w"
180
181# Pan 100 percent of the window size with arrows
182macro Alt_Shift_XK_Left "scroll l 1 w"
183macro Alt_Shift_XK_Up "scroll u 1 w"
184macro Alt_Shift_XK_Right "scroll r 1 w"
185macro Alt_Shift_XK_Down "scroll d 1 w"
186