Many utilities provide a history of what's been copied to the clipboard (e.g. Alfred). I'd like to do something similar: provide a history of everything that's been typed, to be able to search/reinsert it easily.
It would do something like this:
1) Record all keystrokes and append them to a string
2) Chop up the string into a new 'phrase' every time:
- A modifier key is pressed
- An arrow/tab key is pressed
- The mouse is clicked
3) Store all the phrases in chronological order somewhere
4) Show a UI that displays the most recent phrases and allows pasting them into the current context
Is this something that Hammerspoon could do? If so, any tips on where I should start?