some variables were given an unsigned type when the signed version is probably sufficient
corrected some nominal inconsistencies between format specifiers and corresponding arguments
size and type adjustments to prevent loss of precision, value coercion, etc.
correcting some indentation issues
Correction for overzealous precaution

A previous modification establish the KeystrokeValueTable
structure and defensive programming techniques to ensure program
robustness. However, the defensive techniques have been shown to
be "too defensive" because the optimizer now issues internal error
#4 at start up time.

Stepping thru the code reveals the internal error results from an
attempt to make sure a valid string exists in the
KeystrokeValueTable at a given index. However, since the attempt
in question results from the would-be insertion of the first
string entry, no string exists, prompting the internal error.

At the same time, the absence of a string in this case is not an
inherently bad thing and is to be expected instead because the
minimum index for searching in findKeyInTable() equals the number
of entries used in the table. However, whenever the minimum index
equals the number of entries used in the table, the keystroke is
clearly not in the table already and an early return from the
function can occur.