/**
  * Add a new keystroke, with codes[0] containing the pressed key's unicode and the rest of the
  * array containing unicode for adjacent keys, sorted by reducing probability/proximity.
  *
  * @param codes the array of unicode values
  */
 public void add(int primaryCode, int[] codes) {
   mTypedWord.append((char) primaryCode);
   correctPrimaryJuxtapos(primaryCode, codes);
   correctCodesCase(codes);
   mCodes.add(codes);
   if (Character.isUpperCase((char) primaryCode)) mCapsCount++;
 }