Added function key handling