callbacks and secondary keymap binding

If there's a better way that I just didn't understand, pls let me know.  My goal was to let the user just hit ESC and abandon an edit session in a way familiar to those who have no idea what emacs is, but to have those editing conveniences myself.  Seems to be working well so far.  I didn't end up using the 1st commit (callbacks) but might in the future and it seemed useful to keep.  

This approach, where my app does this:
                     jlineReader.setKeyMap(jline.console.KeyMap.EMACS_META)
                     jlineReader.getKeys.bind(jline.console.KeyMap.ESCAPE.toString, jline.console.Operation.QUIT)

                     jlineReader.setKeyMap(KeyMap.VI_MOVE)
                     jlineReader.getKeys.bind(jline.console.KeyMap.ESCAPE.toString, jline.console.Operation.QUIT)
                     jlineReader.setKeyMap(startingKeyMap)