[WIP] Keyboard support

This is WIP and targets #263, #314
I suspect you meand to have a `>=` in one of the comparisions.