git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26394
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
{
bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
{
//#ifdef __DARWIN__
// wxHIDKeyboard keyboard;
// return keyboard.IsActive(key);
//#ifdef __DARWIN__
// wxHIDKeyboard keyboard;
// return keyboard.IsActive(key);
//a known apple bug prevents the system from determining led
//states with GetKeys... can only determine caps lock led
return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key));
//a known apple bug prevents the system from determining led
//states with GetKeys... can only determine caps lock led
return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key));
-//else
-// KeyMapByteArray keymap;
-// GetKeys((BigEndianLong*)keymap);
-// return !!(BitTst(keymap, (sizeof(KeyMapByteArray)*8) - iKey));
-//#endif
+#else
+ KeyMap keymap;
+ GetKeys(keymap);
+ return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key));
+#endif