I believe this approach in general is known as https://en.wikipedia.org/wiki/Frequency_analysis
It would be trickier however if looking at raw keystrokes, as one has to consider several confounding factors:
* The caret can be moved both by keystrokes and mouse * You don't know what is being typed. If someone is typing people's names all day, or writing software then the analysis of letter/key frequency will be shifted
Not impossible, but makes the process harder.