Hacker News new | ask | show | jobs
by speq 504 days ago
Yes, there's some solid theory behind it:

https://en.wikipedia.org/wiki/De_Bruijn_sequence

It seems that you can do it in 10003 key presses. Calculation for this this exact example is in the Wikipedia page.