User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 
Starting with version 97b, Finale for Windows supports a fully customizable keyboard map for use with Speedy Entry. This map was designed to accomodate various international keyboards, but can be altered by anyone wishing to customize their Speedy Entry keyboard usage.

There is no user interface to the keymap at this time. Editing the key map requires a fairly high level of technical expertise. You must know about ANSI character codes and virtual-key codes. Also, in order to edit the key map you will need to edit your FINALE.INI file directly. [No longer necessary; FinaleTweak takes care of all the difficult stuff described below. Available for download here.] All the normal caveats about editing an INI file apply (make backups, etc.), and will not be delved into here.

The key map is a table of over 100 values stored in FINALE.INI under the section header [SpeedyKeys]. The beginning of the table looks like this:
[SpeedyKeys]
SK000=59 0 -1 -1 -1 5
SK001=65549 0 0 -1 -1 34
SK002=65582 0 -1 -1 -1 23
... (and so on)

Each SK<number>= line represents a keystroke and its associated action. When a keystroke is processed, the key map is scanned in numerical order using the number suffixed to "SK" for ordering. As soon as a match is found, the scan terminates and the associated action is performed. Because the table is scanned in order, it is possible for a key event to have more than one action associated with it, depending on the states of the modifier keys. Specific cases can be handled first, then more general cases. (Note that because of how Windows writes keys to an INI file, the physical order of the keys may vary. It is the numerical order that is important.)

Each line in the table contains six values, defined as follows:

  1. The keyboard virtual-key code or ANSI character code (see explanation below)
  2. The state of the control key (0 = not pressed, 1 = pressed, -1 = don't care)
  3. The state of the shift key (0 = not pressed, 1 = pressed, -1 = don't care)
  4. The state of the caps lock key (0 = not locked, 1 = locked, -1 = don't care)
  5. The state of the num lock key (0 = not locked, 1 = locked, -1 = don't care)
  6. The action code (see explanation below)

Keyboard virtual-key code -- Finale needs to detect keyboard events both at the virtual-key code level and the ANSI character level. The virtual-key code is required, for example, to distinguish between the '*' from the numeric keypad (which toggles the accidental on/off) and the '*' above the '8' key on the US keyboard (which inserts a double-whole duration).

Values in this field less than 65536 are ANSI character codes. Values greater than or equal to 65536 are virtual-key codes. To determine the actual virtual-key code, subtract 65536 from the value in the table.

It is necessary to have knowledge of the virtual-key codes to edit this table properly. These codes differ among various international keyboards, and can often not be guessed at either by the characters on the keycaps or the position of the key on the keyboard.
However, the predefined virtual-key codes (VK_*) in Windows can safely be used. These codes and their values are found in the technical documentation for the Windows PDK. If the key isn't available as a virtual-key constant, you must have access to the appropriate technical documentation for the specific keyboard driver.

ANSI character codes (65 = 'A', etc.) are well documented elsewhere and will not be described here.

Action code -- the last value in the table is an action code, corresponding to a specific Speedy Entry action. The symbolic names for the actions are as follows (the symbolic names are for the most part self-explanatory given a solid understanding of the operation of the Speedy Entry tool):

SP_CMD_NULL_COMMAND = 0,

SP_CMD_FLIP_HIDE_ENTRY = 1,
SP_CMD_FLIP_PAREN = 2,
SP_CMD_STEMDIR_FLIP = 3,
SP_CMD_STEMDIR_AUTO = 4,
SP_CMD_GRACE = 5,
SP_CMD_VOICE = 6,

SP_CMD_NAV_PREV_LAYER = 7,
SP_CMD_NAV_NEXT_LAYER = 8,

SP_CMD_NAV_PREV_MEAS = 9,
SP_CMD_NAV_NEXT_MEAS = 10,
SP_CMD_NAV_UP_STAFF = 11,
SP_CMD_NAV_DOWN_STAFF = 12,
SP_CMD_NAV_PREV_NOTE = 13,
SP_CMD_NAV_NEXT_NOTE = 14,
SP_CMD_NAV_UP_STEP = 15,
SP_CMD_NAV_DOWN_STEP = 16,
SP_CMD_NAV_HOME = 17,
SP_CMD_NAV_END = 18,

SP_CMD_EDIT_NOTE_UP_HALF_STEP = 19,
SP_CMD_EDIT_NOTE_DOWN_HALF_STEP = 20,
SP_CMD_EDIT_NOTES_UP_HALF_STEP = 21,
SP_CMD_EDIT_NOTES_DOWN_HALF_STEP = 22,

SP_CMD_EDIT_DELETE_ENTRY = 23,
SP_CMD_EDIT_DELETE_NOTE = 24,
SP_CMD_EDIT_TIE_NEXT = 25,
SP_CMD_EDIT_TIE_PREV = 26,
SP_CMD_EDIT_BREAK_JOIN_BEAM = 27,
SP_CMD_EDIT_FLIP_ACCIBIT = 28,
SP_CMD_EDIT_FLIP_FREEZEACCI = 29,
SP_CMD_EDIT_FLIP_FLOATREST = 30,
SP_CMD_EDIT_NOTE_FLIP_ENHARMONIC = 31,
SP_CMD_EDIT_NOTES_FLIP_ENHARMONIC = 32,
SP_CMD_EDIT_ADD_DOT = 33,
SP_CMD_EDIT_ADD_NOTE_TO_ENTRY = 34,

SP_CMD_EDIT_TIEDIR_FLIP = 35,
SP_CMD_EDIT_TIEDIR_AUTO = 36,
SP_CMD_EDIT_TIEDIR_OVER = 37,
SP_CMD_EDIT_TIEDIR_UNDER = 38,

SP_CMD_DURATION_128 = 39,
SP_CMD_DURATION_64 = 40,
SP_CMD_DURATION_32 = 41,
SP_CMD_DURATION_16 = 42,
SP_CMD_DURATION_8 = 43,
SP_CMD_DURATION_Q = 44,
SP_CMD_DURATION_H = 45,
SP_CMD_DURATION_W = 46,
SP_CMD_DURATION_DW = 47,
SP_CMD_DURATION_INSERT_128 = 48,
SP_CMD_DURATION_INSERT_64 = 49,
SP_CMD_DURATION_INSERT_32 = 50,
SP_CMD_DURATION_INSERT_16 = 51,
SP_CMD_DURATION_INSERT_8 = 52,
SP_CMD_DURATION_INSERT_Q = 53,
SP_CMD_DURATION_INSERT_H = 54,
SP_CMD_DURATION_INSERT_W = 55,
SP_CMD_DURATION_INSERT_DW = 56,

SP_CMD_OCTAVE_DN = 57,
SP_CMD_OCTAVE_MID = 58,
SP_CMD_OCTAVE_UP = 59,

SP_CMD_PITCH_LOW_C = 60,
SP_CMD_PITCH_LOW_D = 61,
SP_CMD_PITCH_LOW_E = 62,
SP_CMD_PITCH_LOW_F = 63,
SP_CMD_PITCH_LOW_G = 64,
SP_CMD_PITCH_LOW_A = 65,
SP_CMD_PITCH_LOW_B = 66,

SP_CMD_PITCH_MID_C = 67,
SP_CMD_PITCH_MID_D = 68,
SP_CMD_PITCH_MID_E = 69,
SP_CMD_PITCH_MID_F = 70,
SP_CMD_PITCH_MID_G = 71,
SP_CMD_PITCH_MID_A = 72,
SP_CMD_PITCH_MID_B = 73,

SP_CMD_PITCH_HI_C = 74,
SP_CMD_PITCH_HI_D = 75,
SP_CMD_PITCH_HI_E = 76,
SP_CMD_PITCH_HI_F = 77,
SP_CMD_PITCH_HI_G = 78,
SP_CMD_PITCH_HI_A = 79,
SP_CMD_PITCH_HI_B = 80,

SP_CMD_OPEN = 81,
SP_CMD_CLOSE = 82,

SP_CMD_START_TUPLET_ASK = 83,
SP_CMD_START_TUPLET_32 = 84,
SP_CMD_START_TUPLET_16 = 85,
SP_CMD_START_TUPLET_8 = 86,
SP_CMD_START_TUPLET_Q = 87,
SP_CMD_START_TUPLET_H = 88,
SP_CMD_START_TUPLET_W = 89,
SP_CMD_START_TUPLET_DW = 90,

SP_CMD_EDIT_FLAT_BEAM = 100,
SP_CMD_EDIT_SLASH_GRACE = 101,
SP_CMD_UPDATE_FRAME = 102


Using this information, you can decode the first three lines of the sample table above as follows:

SK000=59 0 -1 -1 -1 5
-- 59 is ANSI code for semicolon (;)
-- control key is not pressed, other modifiers don't care
-- action code is SP_CMD_GRACE (toggle grace note)

SK001=65549 0 0 -1 -1 34
-- 65549 is a virtual-key code; subtract 65536 to get 13, virtual-key code for the Enter key (VK_ENTER)
-- neither control nor shift pressed, other modifiers don't care
-- action code is SP_CMD_EDIT_ADD_NOTE_TO_ENTRY

SK002=65582 0 -1 -1 -1 23
-- 65582 is a virtual-key code; subtract 65536 to get 46, virtual-key code for the Delete key (VK_DELETE)
-- control key is not pressed, other modifiers don't care
-- action code is SP_CMD_EDIT_DELETE_ENTRY