Added getkey and pollevents