New method to detect key press based on key binding

Instead of tracking changes to the document, we bind directly to the
keys.

Should fix #14 and #16.