Difference between revisions of "Documentation/OOo3 User Guides/Writer Guide/Assigning shortcut keys"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Example: Assigning macros to shortcut keys)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Assigning shortcut keys - DRAFT}}
+
{{DISPLAYTITLE:Assigning shortcut keys}}
 +
[[ru:RU/documentation/ooo3_user_guides/writer_guide/assigning_shortcut_keys]]
 
{{Documentation/WG3CustomizeTOC
 
{{Documentation/WG3CustomizeTOC
 
|ShowPrevNext=block
 
|ShowPrevNext=block
Line 7: Line 8:
 
In addition to using the built-in keyboard shortcuts (listed in Appendix A), you can define your own. You can assign shortcuts to standard OOo functions or your own macros and save them for use with the entire OpenOffice.org suite.
 
In addition to using the built-in keyboard shortcuts (listed in Appendix A), you can define your own. You can assign shortcuts to standard OOo functions or your own macros and save them for use with the entire OpenOffice.org suite.
  
{{Documentation/Caution| Be careful when reassigning your operating system’s or OOo’s predefined shortcut keys. Many key assignments are universally understood shortcuts, such as ''F1'' for Help, and are always expected to provide certain results. Although you can easily reset the shortcut key assignments to the OOo defaults, changing some common shortcut keys can cause confusion, frustration and possible data loss or corruption, especially if other users share your computer.}}
+
{{Warn| Be careful when reassigning your operating system’s or OOo’s predefined shortcut keys. Many key assignments are universally understood shortcuts, such as ''F1'' for Help, and are always expected to provide certain results. Although you can easily reset the shortcut key assignments to the OOo defaults, changing some common shortcut keys can cause confusion, frustration and possible data loss or corruption, especially if other users share your computer.}}
  
 
To adapt shortcut keys to your needs, use the Customize dialog, as described below.
 
To adapt shortcut keys to your needs, use the Customize dialog, as described below.
Line 14: Line 15:
 
# To have the shortcut key assignment available in all components of OpenOffice.org select the '''OpenOffice.org''' button.
 
# To have the shortcut key assignment available in all components of OpenOffice.org select the '''OpenOffice.org''' button.
 
# Next select the required function from the ''Category'' and ''Function'' lists.
 
# Next select the required function from the ''Category'' and ''Function'' lists.
# Now select the desired shortcut keys in the ''Shortcut keys'' list and click the '''Modify''' button at the upper right.
+
# Now select the desired shortcut keys in the ''Shortcut keys'' list at the top of the page and click the '''Modify''' button on the right. The selection now appears in the ''Keys'' list on the lower right.
 
# Click '''OK''' to accept the change. Now the chosen shortcut keys will execute the function chosen in step 3 above whenever they are pressed.
 
# Click '''OK''' to accept the change. Now the chosen shortcut keys will execute the function chosen in step 3 above whenever they are pressed.
  
{{Documentation/Note| All existing shortcut keys for the currently selected ''Function'' are listed in the ''Keys'' selection box. If the ''Keys'' list is empty, it indicates that the chosen key combination is free for use. If it were not, and you wanted to reassign a shortcut key combination that is already in use, you must first '''Delete''' the existing ''Key''.
+
{{Note| All existing shortcut keys for the currently selected ''Function'' are listed in the ''Keys'' selection box. If the ''Keys'' list is empty, it indicates that the chosen key combination is free for use. If it were not, and you wanted to reassign a shortcut key combination that is already in use, you must first '''Delete''' the existing ''Key''.
  
 
Shortcut keys that are greyed-out in the listing on the Customize dialog, such as ''F1'' and ''F10,'' are not available for reassignment.}}
 
Shortcut keys that are greyed-out in the listing on the Customize dialog, such as ''F1'' and ''F10,'' are not available for reassignment.}}
Line 24: Line 25:
 
You can configure shortcut keys to quickly assign styles in your document. Some shortcuts are predefined, such as ''Ctrl+1'' for the ''Heading 1'' paragraph style and ''Ctrl+2'' for ''Heading 2''. You can modify these shortcuts and create your own.
 
You can configure shortcut keys to quickly assign styles in your document. Some shortcuts are predefined, such as ''Ctrl+1'' for the ''Heading 1'' paragraph style and ''Ctrl+2'' for ''Heading 2''. You can modify these shortcuts and create your own.
  
# Click '''Tools > Customize > Keyboard'''. The Keyboard page of the Customize dialog opens.
+
<ol><li> Click '''Tools > Customize > Keyboard'''. The Keyboard page of the Customize dialog opens.
# To have the shortcut key assignment available only with one component (for example, Writer), select that component’s name in the upper right corner of the page; otherwise select '''OpenOffice.org''' button to make it available to every component.
+
<li> To have the shortcut key assignment available only for Writer, select '''Writer''' in the upper right corner of the page; otherwise select '''OpenOffice.org''' to make it available to every component.
# Choose the shortcut keys you want to assign a style to. In this example, we have chosen ''Ctrl+9''.
+
<li> Choose the shortcut keys you want to assign a style to. In this example, we have chosen ''Ctrl+9''.
# 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.
+
<li> 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.
# Choose the category of style (our example uses a paragraph style). The ''Function'' list will display the names of the available styles for the selected category. The example shows some of OOo’s predefined styles.
+
<li> Choose the category of style (our example uses a paragraph style). The ''Function'' list will display the names of the available styles for the selected category. The example shows some of OOo’s predefined styles.
# To assign ''Ctrl+9'' to be the shortcut key combination for the Text Body style, select ''Text Body'' in the ''Function'' list, and then click '''Modify'''. ''Ctrl+9'' now appears in the ''Keys'' list.
+
# Make any other required changes, and then click '''OK''' to save these settings and close the dialog.
+
  
 
[[Image:GS3-14-8.png|thumb|none|500px|''Defining keyboard shortcuts for applying styles'']]
 
[[Image:GS3-14-8.png|thumb|none|500px|''Defining keyboard shortcuts for applying styles'']]
 +
 +
<li> To assign ''Ctrl+9'' to be the shortcut key combination for the Text Body style, select ''Text Body'' in the ''Function'' list, and then click '''Modify'''. ''Ctrl+9'' now appears in the ''Keys'' list.
 +
<li> Make any other required changes, and then click '''OK''' to save these settings and close the dialog.
 +
</li></ol>
  
 
== Example: Assigning macros to shortcut keys ==
 
== Example: Assigning macros to shortcut keys ==
Line 40: Line 43:
  
 
<ol>
 
<ol>
<li>Use '''Tools > Macros > Record Macro''' to start recording a macro.
+
<li>Choose '''Tools > Macros > Record Macro''' to start recording a macro.
  
 
A small window is displayed so you know that OpenOffice.org is recording.
 
A small window is displayed so you know that OpenOffice.org is recording.
 
[[Image:StopRecording3.png]]
 
[[Image:StopRecording3.png]]
<li>Use '''Insert > Special Characters''' to open the Special Characters dialog box. Scroll down until you find the en-dash (U+2013) and em-dash (U+2014) characters. Select one of them and click '''OK'''.
+
<li>Choose '''Insert > Special Characters''' to open the Special Characters dialog box. Scroll down until you find the en-dash (U+2013) and em-dash (U+2014) characters. Select one of them and click '''OK'''.
  
 
[[Image:WG3-17-9.png|thumb|none|500px|''Find and choose the en-dash.'']]
 
[[Image:WG3-17-9.png|thumb|none|500px|''Find and choose the en-dash.'']]
Line 54: Line 57:
 
<li>Be sure to open the library container named ''My Macros''. Find the library named ''Standard'' under My Macros. Select Module1 and click '''Save'''.
 
<li>Be sure to open the library container named ''My Macros''. Find the library named ''Standard'' under My Macros. Select Module1 and click '''Save'''.
 
<li>Repeat steps 1–4 to create other macros, for example to insert an em-dash.
 
<li>Repeat steps 1–4 to create other macros, for example to insert an em-dash.
<li>Use '''Tools > Customize''' > ''Keyboard'' tab. In the Shortcut keys list, pick an unused combination (for example, ''Ctrl+Shift+N'' for an en-dash). In the Category list, scroll down to OpenOffice.org Macros, click the + sign, then click the + next to the Standard library and choose Module1. In the Function list, choose '''Endash''' and click the '''Modify''' button on the upper right. The selected key combination now appears in the Keys list on the lower right, and Endash appears next to ''Ctrl+Shift+N'' in the Shortcut keys list.
+
<li>Choose '''Tools > Customize > Keyboard tab'''. In the Shortcut keys list, pick an unused combination (for example,
 +
''Ctrl+Shift+N'' for an en-dash). In the Category list, scroll down to OpenOffice.org Macros, click the + sign (or small triangle, depending on your operating system), then click the + (or triangle) next to the Standard library and choose Module1. In the Function list, choose '''Endash''' and click the '''Modify''' button on the upper right. The selected key combination now appears in the Keys list on the lower right, and Endash appears next to ''Ctrl+Shift+N'' in the Shortcut keys list.
 +
<li>Repeat for the em-dash macro, then click '''OK'''.
  
 
[[Image:WG3-17-11.png|thumb|none|500px|''Defining keyboard shortcuts for running macros.'']]
 
[[Image:WG3-17-11.png|thumb|none|500px|''Defining keyboard shortcuts for running macros.'']]
  
<li>Repeat for the em-dash macro, then click '''OK'''.
+
</li></ol>
</ol>
+
  
{{Documentation/Tip| For inserting en- and em-dashes, and other special characters, you may find extensions such as Compose Special Characters useful. See [[Documentation/OOo3_User_Guides/Writer Guide/Using extensions|Adding functionality with extensions]].}}
+
{{Tip| For inserting en- and em-dashes, and other special characters, you may find extensions such as Compose Special Characters useful. See [[Documentation/OOo3_User_Guides/Writer Guide/Using extensions|Adding functionality with extensions]].}}
  
 
== Saving changes to a file ==
 
== Saving changes to a file ==

Latest revision as of 20:32, 15 July 2018


In addition to using the built-in keyboard shortcuts (listed in Appendix A), you can define your own. You can assign shortcuts to standard OOo functions or your own macros and save them for use with the entire OpenOffice.org suite.

Documentation caution.png Be careful when reassigning your operating system’s or OOo’s predefined shortcut keys. Many key assignments are universally understood shortcuts, such as F1 for Help, and are always expected to provide certain results. Although you can easily reset the shortcut key assignments to the OOo defaults, changing some common shortcut keys can cause confusion, frustration and possible data loss or corruption, especially if other users share your computer.

To adapt shortcut keys to your needs, use the Customize dialog, as described below.

  1. Select Tools > Customize > Keyboard. The Customize dialog opens.
  2. To have the shortcut key assignment available in all components of OpenOffice.org select the OpenOffice.org button.
  3. Next select the required function from the Category and Function lists.
  4. Now select the desired shortcut keys in the Shortcut keys list at the top of the page and click the Modify button on the right. The selection now appears in the Keys list on the lower right.
  5. Click OK to accept the change. Now the chosen shortcut keys will execute the function chosen in step 3 above whenever they are pressed.
Documentation note.png All existing shortcut keys for the currently selected Function are listed in the Keys selection box. If the Keys list is empty, it indicates that the chosen key combination is free for use. If it were not, and you wanted to reassign a shortcut key combination that is already in use, you must first Delete the existing Key.

Shortcut keys that are greyed-out in the listing on the Customize dialog, such as F1 and F10, are not available for reassignment.

Example: Assigning styles to shortcut keys

You can configure shortcut keys to quickly assign styles in your document. Some shortcuts are predefined, such as Ctrl+1 for the Heading 1 paragraph style and Ctrl+2 for Heading 2. You can modify these shortcuts and create your own.

  1. Click Tools > Customize > Keyboard. The Keyboard page of the Customize dialog opens.
  2. To have the shortcut key assignment available only for Writer, select Writer in the upper right corner of the page; otherwise select OpenOffice.org to make it available to every component.
  3. Choose the shortcut keys you want to assign a style to. In this example, we have chosen Ctrl+9.
  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 (our example uses a paragraph style). The Function list will display the names of the available styles for the selected category. The example shows some of OOo’s predefined styles.
    Defining keyboard shortcuts for applying styles
  6. To assign Ctrl+9 to be the shortcut key combination for the Text Body style, select Text Body in the Function list, and then click Modify. Ctrl+9 now appears in the Keys list.
  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. Choose Tools > Macros > Record Macro to start recording a macro. A small window is displayed so you know that OpenOffice.org is recording. StopRecording3.png
  2. Choose Insert > Special Characters to open the Special Characters dialog box. Scroll down until you find the en-dash (U+2013) and em-dash (U+2014) characters. Select one of them and click OK.
    Find and choose the en-dash.
  3. Click the Stop Recording button to stop recording, save the macro, and display the OpenOffice.org Basic Macros dialog. Type a descriptive name for the new macro in the Macro name box on the upper left.
    Naming the new macro and storing it.
  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.
  6. Choose Tools > Customize > Keyboard tab. In the Shortcut keys list, pick an unused combination (for example, Ctrl+Shift+N for an en-dash). In the Category list, scroll down to OpenOffice.org Macros, click the + sign (or small triangle, depending on your operating system), then click the + (or triangle) next to the Standard library and choose Module1. In the Function list, choose Endash and click the Modify button on the upper right. The selected key combination now appears in the Keys list on the lower right, and Endash appears next to Ctrl+Shift+N in the Shortcut keys list.
  7. Repeat for the em-dash macro, then click OK.
    Defining keyboard shortcuts for running macros.
Tip.png For inserting en- and em-dashes, and other special characters, you may find extensions such as Compose Special Characters useful. See Adding functionality with extensions.


Saving changes to a file

Changes to the shortcut key assignments can be saved in a keyboard configuration file for use at a later time, thus permitting you to create and apply different configurations as the need arises. To save keyboard shortcuts to a file:

  1. After making your keyboard shortcut assignments, click the Save button near the bottom right of the Customize dialog.
  2. In the Save Keyboard Configuration dialog, select All files from the Save as Type list.
  3. Next enter a name for the keyboard configuration file in the File name box, or select an existing file from the list. If you need to, browse to find a file from another location.
  4. Click Save. A confirmation dialog appears if you are about to overwrite an existing file, otherwise there will be no feedback and the file will be saved.

Loading a saved keyboard configuration

To load a saved keyboard configuration file and replace your existing configuration, click the Load button near the bottom right of the Customize dialog, and then select the configuration file from the Load Keyboard Configuration dialog.

Resetting the shortcut keys

To reset all of the keyboard shortcuts to their default values, click the Reset button near the bottom right of the Customize dialog. Use this feature with care as no confirmation dialog will be displayed; the defaults will be set without any further notice or user input.


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools
In other languages