Accepted menu keys must have the same length as menu.

This fixes cd to HOME after hitting an out-of-range key.