makeKeySegment offset is zero based.
added - 1 to match legacy keysegement