-#if __WXMAC_CARBON__
-//#ifdef __DARWIN__
-// wxHIDKeyboard keyboard;
-// return keyboard.IsActive(key);
-//#else
-// TODO: Have it use HID Manager on OSX...
-//if OS X > 10.2 (i.e. 10.2.x)
-//a known apple bug prevents the system from determining led
-//states with GetKeys... can only determine caps lock led
- return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key));
-#else
- KeyMap keymap;
- GetKeys(keymap);
- return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key));
-#endif
+ wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key !=
+ WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons"));
+
+ KeyMap keymap;
+ GetKeys(keymap);
+ return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key));