added mouse and keyboard listeners to main layer