Added key input and mouse grabbin