#endif // wxUSE_THREADS
}
-long wxMacTranslateKey(unsigned char key, unsigned char code) ;
long wxMacTranslateKey(unsigned char key, unsigned char code)
{
long retval = key ;
ms.SetX(pt.x);
ms.SetY(pt.y);
+#if TARGET_API_MAC_OSX
UInt32 buttons = GetCurrentButtonState();
ms.SetLeftDown( (buttons & 0x01) != 0 );
ms.SetMiddleDown( (buttons & 0x04) != 0 );
ms.SetRightDown( (buttons & 0x02) != 0 );
-
+#else
+ ms.SetLeftDown( Button() );
+ ms.SetMiddleDown( 0 );
+ ms.SetRightDown( 0 );
+#endif
+
UInt32 modifiers = GetCurrentKeyModifiers();
ms.SetControlDown(modifiers & controlKey);
ms.SetShiftDown(modifiers & shiftKey);
event.m_keyCode = keyval ;
#if wxUSE_UNICODE
event.m_uniChar = uniChar ;
- if ( event.GetEventType() == wxEVT_CHAR )
- event.m_keyCode = uniChar ;
#endif
event.m_rawCode = keymessage;