Macros Settings

You can use the Macros tab to customize your keyboard function keys with pre-programmed sets of keystrokes that are executed when you press the function key. Macros you create in this tab apply only to the current user (login name). Administrators use the Sierra Administration Application to create macros for any user.

Customizing Function Keys

To customize the function keys for the current user:

  1. Select Admin | Settings. The Settings window opens.
  2. Click the Macros tab.
  3. Select one of the following tabs depending on which keys you want to customize:
    • No Modifier - to customize function keys F1 through F12
    • ALT - to customize function key combinations Alt+F1 through Alt+F12
    • CTRL - to customize function key combinations Ctrl+F1 through Ctrl+F12
    • SHIFT - to customize function key combinations Shift+F1 through Shift+F12

Some function keys are reserved by the system. See the Reserved Keys section below for further information.

  1. In the corresponding text input box, enter text and/or keyboard codes.
  2. Repeat the foregoing steps until you have customized all the function keys you want to use.
  3. Depending on how you want to use the customized function keys, do one of the following:
    • To retain the customizations you have made, click Save Settings. The Settings window closes. Sierra applies your changes during the current session and retains them for use in subsequent sessions.
    • To use the customized keys for the current session only, click OK. The Settings window closes. After you log off of the current session, Sierra does not retain your custom changes.
    • To clear all unsaved changes, click Reset.
    • To exit the Settings window and discard your changes, click Cancel.

Creating Macros

The following guidelines apply to creating macros in the Sierra Desktop Application, Sierra Web, and the Sierra Administration Application.

You can customize function keys F1 through F12 singly or in combination with the Alt, Ctrl, or Shift keys. When you have customized your function keys, you can press them to activate the macro. For example, you can customize F9 to enter the text string "Colorado Springs". You can then put the cursor in the City field for new patron records and press F9 instead of typing "Colorado Springs".

Note that some function keys are reserved by the system. See Reserved Function Keys below for further information.

Entering Text in a Macro

To enter text for a macro, type the text. For example, enter "Bay Street Branch Juvenile" (without quotation marks) in the F9 text box. This associates the F9 function key with that string of text.

To test the macro, place the cursor in any text input field, such as an item record Location field, and press F9. Sierra populates the text field with the string "Bay Street Branch Juvenile".

Macros are case-sensitive, that is, they distinguish between uppercase and lowercase letters. When you need a capital 'B', be sure to enter 'B' and not 'b'.

Entering Diacritics and Special Characters in a Macro

You can enter diacritics and special characters into macro text using the appropriate Unicode code preceded by "u" and within braces. For example, the British pound sign (£) is entered as {u00A3}.

You can enter diacritics by using the code for the combining diacritic followed by the letter that is modified. However, in Unicode it is more common to use a single code for the diacritic and letter together. For example, ñ is entered as {u00F1}.

If you want to enter only the diacritic into a macro so that you can use the macro to modify a preceding character, add the \ character before the closing } in the macro. For example, if you want the macro to supply the acute accent diacritic (´) to any character that precedes it, enter {u0301\} as the macro text. Then, you can type a character, such as a, e, or o, followed by the macro key to produce the modified character á, é, or ó.

You might have to toggle the View | Show Codes menu option to see the diacritics rather than the code.

Entering Keyboard Codes in a Macro

You can specify non-alphanumeric keys, such as Ctrl, Shift, and Page Up, in a macro. You can also use a combination of non-alphanumeric keys and alphanumeric keys. For example, Ctrl+a selects all the items in a table.

To use a non-alphanumeric key or key combination, you must enter a keyboard code in the function key text box. The keyboard codes use all capital letters and are enclosed in percent signs, for example, %ENTER% corresponds to the Enter key.

To enter non-alphanumeric keys for a macro:

Note that you can use only the non-alphanumeric characters listed in the pop-up menu. The system does not recognize other non-alphanumeric keys.

The system uses the plus sign + for non-alphanumeric/alphanumeric key combinations. For example, %CTRL+a% corresponds to Ctrl+a, which selects all the items in a table. Note that the 'a' is inside the percent signs to signify that it is entered while the Ctrl key is depressed. Be careful not to place extra letters inside the percent signs, unless that is what you intend. For example, in Circulation, to change the function to Search/Holds, you enter Alt+g, and then press u, and then h. To make this key combination into a macro, enter %ALT+g%uh in the function key text box.

Limitations

A macro cannot affect more than one object, such as a screen, dialog box, or table. For example, in Circulation, to modify the Note in a patron record, you enter Ctrl+Shift+E to edit the patron record, and then Alt+N to move the cursor to the Note text box. A macro for this key combination would look like this:

%CTRL+SHIFT+e%%ALT+n%

However, the macro does not work, because the first set of keys applies to Circulation Desk window and the second set to the Edit Patron Record dialog box.

Summary of Rules for Entering Macros

The following rules apply when entering macros:

  • Macros use alphanumeric keys, non-alphanumeric keys, and text strings in any combination.
  • Macros are case-sensitive.
  • Spaces are allowed within text strings, but not between keyboard codes.
  • Keyboard codes are all uppercase.
  • Keyboard codes must be enclosed in percent signs.
  • To represent alphanumeric and non-alphanumeric keys pressed simultaneously, enclose the letter or number and the keyboard code in percent signs.
  • Use the plus sign '+' to indicate keys that are "pressed" simultaneously.
  • Text strings are not separated from alphanumeric or non-alphanumeric keys by plus signs or other markers.
  • Macros cannot change the active screen element, that is, macro elements cannot apply to separate windows elements or dialog boxes.
Special Function Key on PCs using Windows

Macros assigned to the F6 function key work like TAB commands, that is, F6 moves the current focus to another screen element. For macros that are configured to open a menu or function, this effect is inconsequential. However, for macros that are configured to enter data into a field, this causes the system to switch focus from a field before it can enter the data. To avoid this conflict, do not configure the F6 function key to enter data in fields.

Reserved Function Keys

Some function keys are reserved by the system. For example, ALT+F4 is reserved to close the current window or browser. In the Sierra Desktop Application and Sierra Web, the macro text input box contains the text "RESERVED" and is uneditable for reserved keys. Note that the reserved keys differ between the Sierra Desktop Application and Sierra Web, as noted in the drop-down lists below.

List of Keyboard Codes

The following table shows you the character strings that correspond to various non-alphanumeric keys. Note that the codes use all capital letters and that the code must be enclosed in percent signs.

Use these codes to incorporate non-alphanumeric characters in macros.

To represent simultaneous keystrokes, use the '+' sign. For example:

%CTRL+SHIFT+p%

Keyboard Code Corresponding Key Combination
%HOME% Home
%END% End
%LEFT% Left Arrow
%RIGHT% Right Arrow
%UP% Up Arrow
%DOWN% Down Arrow
%TAB% Tab
%PGUP% Page Up
%PGDOWN% Page Down
%ENTER% Enter
%SPACE% Space
%ALT+<another key>% ALT+<another key>
%CTRL+<another key>% CTRL+<another key>
%SHIFT+<another key>% SHIFT+<another key>