Writer Guide

4) In the
Functions
section at the bottom of the dialog, scroll down
in the Category list to
Styles
. Click the + sign to expand the list of
styles.
5) Choose the category of style. (This example uses a paragraph
style, but you can also choose character styles and others.) The
Function
list will display the names of the available styles for the
selected category. The example shows some of OOo’s predefined
styles.
6) To assign
Ctrl+9
to be the shortcut key combination for the List 1
style, select
List 1
in the
Function
list, and then click Modify.
Ctrl+9
now appears in the
Keys
list on the right, and
List 1
appears next to
Ctrl+9
in the Shortcut keys box at the top.
7) Make any other required changes, and then click OK to save
these settings and close the dialog.
Example: Assigning macros to shortcut keys
A common use for assigning macros to shortcut keys is to enable quick
and easy insertion of special characters. This example shows how to st
up keyboard shortcuts for inserting en-dashes and em-dashes.
First, you need to record a macro for inserting each type of dash. Then,
you need to assign those macro to shortcut key combinations.
1) Use Tools > Macros > Record Macro to start
recording a macro.
A small window is displayed so you know that
OpenOffice.org is recording.
2) Use Insert > Special Characters to open the Special Characters
dialog box (Figure 441). Scroll down until you find the en-dash
(U+2013) and em-dash (U+2014) characters. Select one of them
and click OK.
3) Click the Stop Recording button to stop recording, save the
macro, and display the OpenOffice.org Basic Macros dialog (see
Figure 442). Type a descriptive name for the new macro in the
Macro name box on the upper left.
4) Be sure to open the library container named
My Macros
. Find the
library named
Standard
under My Macros. Select Module1 and
click Save.
5) Repeat steps 1–4 to create other macros, for example to insert an
em-dash.
526 OpenOffice.org 3 Writer Guide