Fix test_kernel to support keyboard emulation

Simple fix, that would help people trying the project on the emulator first.