Key event handling extracted
Merge branch 'master' of https://github.com/traff/jediterm