- wxUnusedVar(aTextView);
- wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
- if ( impl )
- {
- wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer();
- if (commandSelector == @selector(insertNewline:))
- {
- if ( wxpeer && wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER )
- {
- wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId());
- event.SetEventObject( wxpeer );
- event.SetString( static_cast<wxTextCtrl*>(wxpeer)->GetValue() );
- wxpeer->HandleWindowEvent( event );
- }
- }
- }
-
- return NO;
+ wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
+ if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
+ [super keyUp:event];