Add gcc extension for enum size, handle mouse events and better key handling