Add hotkey evaluation

Targets #396.
I intend to rewrite the key caching and playback, so this is WIP.