Added key constants. Got some problems with key/mouse event processing.