Move keypress logic to its own plugin. Issue #28