Add some keyboard handling code