From f4c24d3da4e0b4a85ce4a5503cf401b4bdb021a5 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 25 Sep 2009 18:53:38 +0000 Subject: [PATCH] using native key handling, closes #10406 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/listbox.mm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/osx/cocoa/listbox.mm b/src/osx/cocoa/listbox.mm index f354c9bc0c..79389e8306 100644 --- a/src/osx/cocoa/listbox.mm +++ b/src/osx/cocoa/listbox.mm @@ -150,6 +150,8 @@ public : virtual void UpdateLineToEnd( unsigned int n); virtual void controlDoubleAction(WXWidget slf, void* _cmd, void *sender); + virtual bool DoHandleKeyEvent(NSEvent *event); + protected : wxNSTableView* m_tableView ; @@ -510,6 +512,18 @@ void wxListWidgetCocoaImpl::controlDoubleAction(WXWidget WXUNUSED(slf),void* WXU list->HandleLineEvent( sel, true ); } +bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event) +{ + wxKeyEvent wxevent(wxEVT_KEY_DOWN); + SetupKeyEvent( wxevent, event ); + wxevent.SetEventObject(GetWXPeer()); + bool result = GetWXPeer()->OSXHandleKeyEvent(wxevent); + + // no interpretKeyEvents here, but rerouting to native keyhandling + + return result; +} + // accessing content -- 2.45.2