added CORKey object and added keyboard events