Administering Macros Settings

In Sierra 6.2 and later, you can define macros separately for the Sierra Desktop Application and Sierra Web in the Administration Application.

You can use the Macros settings menu to customize keyboard function keys with preprogrammed sets of keystrokes that are executed when the user presses the function key. Macros you create with this setting apply only to the current user (login name). The user can change the macros you create using the Macros Settings menu option in the Sierra Desktop Application or Sierra Web.

Customizing Function Keys

Each login can create its own function key settings. To customize the function keys for a login:

  1. In the Administration Application, select Authorizations and Authentication.
  2. From the Users tab, select a user, and click Edit.
  3. Select Settings | Macros. The system displays a series of tables for the following groups of macros:
    • No Modifier - Customizes function keys F1 through F12
    • ALT - Customizes function key combinations Alt+F1 through Alt+F12
    • CTRL - Customizes function key combinations Ctrl+F1 through Ctrl+F12
    • SHIFT - Customizes function key combinations Shift+F1 through Shift+F12

The system shows which keys are reserved for each application. For example:

Macro settings

See the Reserved Keys section below for further information.

  1. For each function key you want to customize, enter text and/or keyboard codes in the corresponding input box.
  2. Click Save to save the macro changes you have made.

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>