Calculates a measure of keyboard distance required for fingers to type out a string.