Moved keyboard parsing code to kernel