I’m thinking the hidden textarea
approach used by CodeMirror will really be necessary - that will handle most of the keyboard work.
https://codemirror.net/doc/internals.html
Anyway, for this spike I’ll just handle a few keys on the div
and call it quits. Going to look at implementing an efficient and flexible content buffer next, since I got an idea for that.