Partial rewrite of View::keyPressed

This commit reconstructs the input-parsing logic

Fixed #20 as a result, while the tab key is also better handled,
providing a better fix to #7.