Debian Codegraph @

doc/sphinx/ui/misc/HotKeys.rst

raw
1 Hot Keys
2 ========
3
4 As noted in hotkey :ref:`assignment <HotKeys.hotkeyassign>` you can nominate the
5 hotkeys which you prefer for all items in any menu of FontForge. Some default
6 hotkeys are shipped with FontForge so that you do not have to assign any keys
7 yourself unless you want to make changes. The defaults are shown below:
8
9 :Ctrl-A: :ref:`Select All <editmenu.All>`
10 :Ctrl-Shift-A: :ref:`Build Accented Glyph <elementmenu.Accented>`
11 :Alt-Ctrl-A: :ref:`Select All Points <editmenu.SelectPoints>`
12 :Ctrl-B: :ref:`Regenerate Bitmaps <elementmenu.Regenerate>`
13 :Ctrl-Shift-B: :ref:`Bitmaps Available <elementmenu.Bitmaps>`
14 :Ctrl-C: :ref:`Copy <editmenu.Copy>`
15 :Ctrl-Shift-C: :ref:`Copy Fg to Bg <editmenu.CopyFg>`
16 :Alt-Ctrl-C: :ref:`Copy Lookup Data <editmenu.CopyLookup>`
17 :Ctrl-D: :ref:`Show/Hide Points <viewmenu.Points>`
18 :Ctrl-Shift-D: :ref:`Correct Direction <elementmenu.Correct>`
19 :Ctrl-E: :ref:`Find Problems <elementmenu.Problems>`
20 :Ctrl-Shift-E: :ref:`Expand Stroke <elementmenu.Expand>`
21 :Ctrl-F: :ref:`Fit in Window <viewmenu.Fit>`
22 :Ctrl-Shift-F: :ref:`Font Info <elementmenu.Font>`
23 :Alt-Ctrl-F: :doc:`Find / Replace </ui/dialogs/search>`
24 :Alt-Ctrl-Shift-F: :ref:`Replace With Reference <editmenu.ReplaceRef>`
25 :Ctrl-G: :ref:`Copy Reference <editmenu.Reference>`
26 :Ctrl-Shift-G: :ref:`Generate Fonts <filemenu.Generate>`
27 :Alt-Ctrl-G: :ref:`Generate Mac Family <filemenu.GenerateMac>`
28 :Ctrl-H: :ref:`Open Outline <windowmenu.Outline>`
29 :Ctrl-Shift-H: :ref:`AutoHint <hintsmenu.AutoHint>`
30 :Alt-Ctrl-H: :ref:`Review Hints <hintsmenu.Review>`
31 :Ctrl-I: :ref:`Get Info <elementmenu.Info>`
32 :Ctrl-Shift-I: :ref:`Import <filemenu.Import>`
33 :Alt-Ctrl-Shift-I: :ref:`Glyph Info <elementmenu.CharInfo>`
34 :Alt-Ctrl-I: :ref:`Show Dependencies... <elementmenu.Dependents>`
35 :Ctrl-J: :ref:`Open Bitmap <windowmenu.Bitmap>`
36 :Ctrl-Shift-J: :ref:`Join <editmenu.Join>`
37 :Ctrl-K: :ref:`Open Metrics <windowmenu.Metrics>`
38 :Ctrl-Shift-K: :ref:`Auto Kern <autowidth.AutoKern>`
39 :Alt-Ctrl-Shift-K: :ref:`Merge Feature Info <filemenu.Merge-feature>`
40 :Ctrl-L: :ref:`Set LBearing <metricsmenu.LBearing>`
41 :Ctrl-Shift-L: :ref:`Set Width <metricsmenu.Width>`
42 :Ctrl-M: :ref:`Merge Point <editmenu.Merge>`
43 :Ctrl-Shift-M: :ref:`Simplify <elementmenu.Simplify>`
44 :Alt-Ctrl-Shift-M: :ref:`Simplify More <elementmenu.SimplifyMore>`
45 :Ctrl-N: :ref:`New <filemenu.New>`
46 :Ctrl-O: :ref:`Open <filemenu.Open>`
47 :Ctrl-Shift-O: :ref:`Remove Overlap <elementmenu.Remove>`
48 :Ctrl-P: :ref:`Print <filemenu.Print>`
49 :Ctrl-Shift-P: :ref:`Balance <elementmenu.Balance>`
50 :Alt-Ctrl-P: :doc:`Display </ui/dialogs/display>`
51 :Ctrl-Q: :ref:`Quit <filemenu.Quit>`
52 :Ctrl-Shift-Q: :ref:`Close <filemenu.Close>`
53 :Ctrl-R: :ref:`Set RBearing <metricsmenu.RBearing>`
54 :Ctrl-Shift-R: :ref:`Revert File <filemenu.Revert>`
55 :Ctrl-Alt-R: :ref:`Revert Glyph <filemenu.RevertGlyph>`
56 :Ctrl-S: :ref:`Save <filemenu.Save>`
57 :Ctrl-Shift-S: :ref:`Save As <filemenu.SaveAs>`
58 :Ctrl-T: :ref:`AutoInstr <hintsmenu.AutoInstr>`
59 :Ctrl-Shift-T: :ref:`AutoTrace <elementmenu.AutoTrace>`
60 :Ctrl-U: :ref:`Unlink Reference <editmenu.Unlink>`
61 :Ctrl-V: :ref:`Paste <editmenu.Paste>`
62 :Ctrl-Shift-V: :ref:`Paste Into <editmenu.PasteInto>`
63 :Ctrl-W: :ref:`Copy Width <editmenu.Width>`
64 :Ctrl-Shift-W: :ref:`Auto Width <metricsmenu.Auto>`
65 :Ctrl-X: :ref:`Cut <editmenu.Cut>`
66 :Ctrl-Shift-X: :ref:`Add Extrema <elementmenu.Add-Extrema>`
67 :Ctrl-Y: :ref:`Redo <editmenu.Redo>`
68 :Ctrl-Shift-Y: :ref:`Add Points Of Inflection <elementmenu.Add-Inflections>`
69 :Ctrl-Z: :ref:`Undo <editmenu.Undo>`
70 :Ctrl-Shift-Z: :ref:`Harmonize <elementmenu.Harmonize>`
71 :Ctrl-\\: :ref:`Transform <elementmenu.Transform>`
72 :Ctrl-Shift-_: :ref:`Round to Int <elementmenu.Round>`
73 :Ctrl-1: :ref:`Make First <pointmenu.Make-First>`
74 :Alt-Ctrl-1: :ref:`Invokes user script <filemenu.ScriptMenu>`
75 :Ctrl-2: :ref:`24 pixel outline <viewmenu.px24>` :ref:`Curve Point <pointmenu.Curve>`
76 :Ctrl-Shift-@: :ref:`Average Points <elementmenu.Average>`
77 :Alt-Ctrl-2: :ref:`Invokes user script <filemenu.ScriptMenu>`
78 :Ctrl-3: :ref:`36 pixel outline <viewmenu.px36>` :ref:`Corner Point <pointmenu.Corner>`
79 :Ctrl-Shift-#: :ref:`Space Points <elementmenu.Space-Pts>`
80 :Alt-Ctrl-3: :ref:`Invokes user script <filemenu.ScriptMenu>`
81 :Ctrl-4: :ref:`48 pixel outline <viewmenu.px48>` :ref:`Tangent Point <pointmenu.Tangent>`
82 :Ctrl-5: :ref:`Anti-Alias <viewmenu.AntiAlias>`
83 :Ctrl-Shift-%: :ref:`32x8 cell window <viewmenu.32x8>`
84 :Ctrl-6: :ref:`Fit To Em <viewmenu.FitToEm>`
85 :Ctrl-Shift-^: :ref:`16x4 cell window <viewmenu.16x4>`
86 :Ctrl-7: :ref:`72 pixel outline <viewmenu.px72>`
87 :Ctrl-Shift-*: :ref:`8x2 cell window <viewmenu.8x2>`
88 :Ctrl-9: :ref:`96 pixel outline <viewmenu.px96>`
89 :Ctrl-0: :ref:`Add Anchor Point... <pointmenu.AddAnchor>`
90 :Ctrl-]: :ref:`Next Glyph <viewmenu.Next>`
91 :Ctrl-Shift-}: :ref:`Next Point <editmenu.NextP>`
92 :Ctrl-[: :ref:`Prev Glyph <viewmenu.Prev>`
93 :Ctrl-Shift-{: :ref:`Prev Point <editmenu.PrevP>`
94 :Ctrl-.: :ref:`Execute Script <filemenu.Execute>`
95
96 :ref:`Select First Point <editmenu.FirstPt>`
97 :Ctrl-Shift->: :ref:`Goto <viewmenu.Goto>`
98 :Alt-Ctrl-.: :ref:`First Point, Next Contour <editmenu.NextContour>`
99 :Ctrl-,: :ref:`Select Point At <editmenu.PointAt>`
100 :Ctrl-Shift-<: :ref:`Find In Font View <viewmenu.FindInFV>`
101 :Alt-Ctrl-,: :ref:`Points on Selected Contours <editmenu.Contours>`
102 :Escape: :ref:`Deselect All <editmenu.Deselect>`
103 :Ctrl-Escape: :ref:`Invert Selection <editmenu.Invert>`
104 :Backspace: :ref:`Clear <editmenu.Clear>`
105 :Delete: :ref:`Clear <editmenu.Clear>`
106 :Ctrl-=: :ref:`Grid Fit Anti Alias <viewmenu.GFAntiAlias>`
107 :Ctrl-Shift-+: :ref:`Bigger Pixel Size <viewmenu.Bigger>`
108
109 :ref:`Bigger Point Size <viewmenu.GFBigger>`
110 :Alt-Ctrl-Shift-+: :ref:`Zoom In <viewmenu.In>`
111 :Ctrl--: :ref:`Smaller Pixel Size <viewmenu.Smaller>`
112
113 :ref:`Smaller Point Size <viewmenu.GFSmaller>`
114 :Alt-Ctrl--: :ref:`Zoom Out <viewmenu.Out>`
115 :Help: :doc:`Help </ui/menus/helpmenu>`
116 :F1: :doc:`Help </ui/menus/helpmenu>` -- :ref:`Index <helpmenu.Index>`
117
118
119 .. _HotKeys.Keyboards:
120
121 Different Keyboards
122 -------------------
123
124 The above descriptions assume you are using a keyboard for an IBM pc or
125 compatible. But different keyboard vendors label their keys differently and
126 different versions of X may map them differently.
127
128 I am aware of the following significant differences:
129
130 * On Mac OS/X the Option key is equivalent to the Alt modifier key
131 * On Suse PPC linux, the Command key is equivalent to the Alt modifier key
132
133 (And the Option key acts as a compose key in the same way it does on the Mac
134 when not using X)
135 * On Suns the meta (diamond) key is equivalent to the Alt modifier key.
136
137
138 Tool modifiers in the Outline Glyph Window
139 ------------------------------------------
140
141 Pointer
142 :Shift: Constrain horizontal/vert or italic angle/45°
143 :Alt: Select control points before normal points
144 :Shift-Alt: Constrain control point motion to original angle from point
145 Magnify
146 :Shift: When dragging a magnification area, make it square
147 :Alt: Minify
148 Freehand
149 :Shift: Constrain horizontal/vert/45°
150 Scroll
151 :Shift: Constrain scroll either in single direction or by same amount in both directions
152 Add curve / Add corner / Add tangent
153 :Shift: Constrain horizontal/vert/45° from last point
154 Pen
155 :Shift: Constrain points h/v/45 from last point
156
157 Constrain control points h/v/45 from point
158 Knife
159 :Shift: Constrain horizontal/vert/45°
160 Ruler
161 :Shift: Constrain measurement to one direction
162 :Alt: Give current position more accurately
163 Scale
164 :Shift: Constrain either to scale along x or y axis or scale both axes the same
165 Rotate
166 :Shift: Constrain rotation to a multiple of 45°
167 Rect/eclipse
168 :Shift: square/circle
169 Polygon/start
170 :Shift: Constrains so that one of the vertices is horizontal/vertical/45°
171 Flip / Skew / Perspective / 3D rotate
172 N/A
173
174
175 Modifier keys for arrow keys in the Outline Glyph Window
176 --------------------------------------------------------
177
178 :Ctrl / CapsLock: Makes the arrow keys scroll
179 :Alt: Makes the arrow keys move by ten times as much as they would otherwise
180
181 The menus
182 ---------
183
184 * :doc:`File </ui/menus/filemenu>`
185 * :doc:`Edit </ui/menus/editmenu>`
186 * :doc:`Point </ui/menus/pointmenu>`
187 * :doc:`Element </ui/menus/elementmenu>`
188 * :doc:`Hints </ui/menus/hintsmenu>`
189 * :doc:`View </ui/menus/viewmenu>`
190 * :doc:`Metrics </ui/menus/metricsmenu>`
191 * :doc:`CID </ui/menus/cidmenu>`
192 * :doc:`MM </ui/menus/mmmenu>`
193 * :doc:`Window </ui/menus/windowmenu>`
194 * :doc:`Help </ui/menus/helpmenu>`
195 * :doc:`Hot Keys <HotKeys>`
196
197
198 .. _HotKeys.hotkeyassign:
199
200 Hotkeys
201 -------
202
203 FontForge lets you assign custom hotkeys to the menus and other actions. Default
204 hotkeys are provided for the menus in all windows which follow familiar key
205 assignments such as Control+O to open a file and Control+c to "copy" something.
206 The current hotkey for each menu item are shown in the menu itself to help you
207 learn existing bindings and see if your modification to the bindings are as you
208 expect.
209
210 The hotkey system allows you to customize the hotkey for anything that appears
211 in the menus. You can freely change the hotkey for a menu item or add one if you
212 find you are using a menu item frequently. Your settings for hotkeys are read
213 from and stored in the ~/.FontForge/hotkeys file. In it's most basic form this
214 file is a sequence of lines of the form action:key. A large default hotkeys file
215 is provided with FontForge in the hotkeys/default file.
216
217 The below fragment of ~/.FontForge/hotkeys will hopefully provide a nice example
218 to get you started creating your own hotkey bindings. As you can see the action
219 part starts with "CharView.Menu.", meaning that this action is to invoke a menu
220 on a specific window type. You can assign a different hotkey to the same menu
221 item in two different window types. For example, the glyph window might have
222 control+o to show font information, whereas the fontview might retain control+o
223 to mean open a font.
224
225 The first action in the below file, Point.Tools.Ruler, will invoke the Ruler
226 menu item which is in the Tools menu, which is itself in the Point top level
227 menu of the charview window (Glyph window). Notice that the key does not need to
228 have a qualifier such as control or alt. Having no modifier for a hotkey is
229 currently limited to the glyph window.
230
231 ::
232
233 CharView.Menu.Point.Tools.Ruler: r
234 CharView.Menu.Point.Tools.Pointer: v
235 CharView.Menu.View.Show.Tab.Tab0: Ctrl+1
236 CharView.Menu.View.Show.Tab.Tab1: Ctrl+2
237 CharView.Menu.View.Zoom in: Shift++
238 CharView.Menu.View.Zoom in: z
239 CharView.Menu.View.Zoom in: =
240 CharView.Menu.Point.Tools.HVCurve: 1
241 +CharView.Menu.Point.Tools.G2: 1
242
243 Continuing down the list you see the use of Ctrl+1 to select a specific tab in
244 the glyph window. This is followed by three key bindings, any of which will zoom
245 the display to a higher magnification level.
246
247 When reading hotkeys files at startup, FontForge will first load many system
248 defaults and then your ~/.FontForge/hotkeys file. Each file is processed from
249 the first line to the last line. When reading these hotkey files, it might be
250 the case that two or more lines have the exact same hotkey. For example, the
251 system default is Control+o to open a file. You might like to override that
252 hotkey to open the font info dialog instead. When FontForge is reading hotkeys
253 files, if a hotkey is encountered that is already in use, the current action for
254 that hotkey is replaced with the new action. So if you have the below line in
255 your ~/.FontForge/hotkeys file then Control+o will open the font info dialog
256 instead of trying to open a font. ::
257
258 CharView.Menu.Element.Font Info...:Ctrl+o
259
260 If you want to add an action for a hotkey rather than replace the current
261 action, prefix the line with a "+" character as the Tools.G2 line does in the
262 above example. This allows the "1" key to invoke both the Tools.HVCurve and
263 Tools.G2 menu items. In this case only one menu will perform a task depending on
264 if spiro mode is active.
265
266 There are many modifiers that FontForge recognizes which are listed in the next
267 paragraph. These are always the English name for the modifier regardless of your
268 locale. The names are fully case insensitive; you can write Control, conTROL, or
269 control and they will have the same effect. The non modifier key, for example
270 's' without the quotes undergoes an internal case modification. If you specify
271 control+S this will be interpreted as control being held while the 's' key is
272 pressed. If you are wanting the Shift key to be held too, you need to explicitly
273 specify that as with control+shift+s as the key definition.
274
275 FontForge recognizes the following standard modifiers: Alt, Esc Ctl, Control,
276 Ctrl, Shft, Shift, CapsLock, Opt (the last corresponds to the Option key on the
277 mac keyboard, Cmd+ for the mac Command key Note: This can only be used by an X
278 program if the X11 application does not appropriate it -- this can be configured
279 in the X11 Preferences).
280
281 Other than the CharView window type, there are FontView and MetricsView.