It's a bit counterintuitive for a function call `applyKeydown` to set the start HTML and to return the body inner HTML. I would say either split this up or call it something like `getHTMLAfterKeydown` and just remove the startHtml stuff?