public synchronized void poll()
  {
    for(int i = 0; i < KEY_COUNT; ++i)
    {      
      if (currentKeys[i])
      {
        //The key is down
        //Check if it was pressed this frame or if it has been down for more than that
        if( keys[i] == KeyState.Up)
            keys[i] = KeyState.Pressed;
        else
            keys[i] = KeyState.Down;
        //They his is down now but wasnt before (Therefor it was pressed this frame)
      }
      else
      {
        if(keys[i] == KeyState.Down)
            keys[i] = KeyState.Released;
        else
            keys[i] = KeyState.Up;
      } 
    }
  }