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