Make 21bit key code more generic.  8517349