get keys support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-03-27 05:33:46 +00:00
parent 97e324eff0
commit bf0f6c9420

View File

@@ -1853,6 +1853,7 @@ int wxKeyCodeToMacModifier(wxKeyCode key)
bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
{
#if __WXMAC_CARBON__
//#ifdef __DARWIN__
// wxHIDKeyboard keyboard;
// return keyboard.IsActive(key);
@@ -1862,11 +1863,11 @@ bool wxGetKeyState(wxKeyCode key) //virtual key code if < 10.2.x, else see below
//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
}
#if !TARGET_CARBON