Fixed compile on OS X

It does not actually run yet.
ChatInput can now be closed via escape key (without sending a text message)