mathquill/mathquill — pull request #234 by laughinghan (2014-02-05 02:19:51+00:00)
Title: Refactor: new keystroke.js; also, move notify to Controller

`interaction.js` (which originally was nothing but `Node::keystroke`) was renamed `keystroke.js`, and the definitions of `Cursor::escapeDir`, `move{Dir,Left,Right,UpDown,Up,Down}`, `backspace`, `delete{Forward,Dir}`, and `select{Left,Right}` were moved into a `Controller.open()` call in `keystroke.js` instead. (This way, all these methods are right next to their primary call sites in `Node::keystroke`.)

Also moved all the `onNotify()` calls into `keystroke.js`, and while we're at it, moved the `notify` system itself into `keystroke.js`, and inlined all of `Cursor::prepare{Move,Edit,Write}`, which had become just wrappers for `.notify()` calls anyway.