More fixes for keyboard and test