APPLEIR_NKEYS
new_key = (index < (int)APPLEIR_NKEYS) ?
repeat_key = (repeat_idx < (int)APPLEIR_NKEYS) ?
for (i = 0; i < APPLEIR_NKEYS; i++) {