Changed keyboard into a record

  - Also added function for single and multi key presses