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:
@@ -1853,6 +1853,7 @@ int wxKeyCodeToMacModifier(wxKeyCode key)
|
|||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
#if __WXMAC_CARBON__
|
||||||
//#ifdef __DARWIN__
|
//#ifdef __DARWIN__
|
||||||
// wxHIDKeyboard keyboard;
|
// wxHIDKeyboard keyboard;
|
||||||
// return keyboard.IsActive(key);
|
// 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
|
//a known apple bug prevents the system from determining led
|
||||||
//states with GetKeys... can only determine caps lock led
|
//states with GetKeys... can only determine caps lock led
|
||||||
return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key));
|
return !!(GetCurrentKeyModifiers() & wxKeyCodeToMacModifier(key));
|
||||||
//else
|
#else
|
||||||
// KeyMapByteArray keymap;
|
KeyMap keymap;
|
||||||
// GetKeys((BigEndianLong*)keymap);
|
GetKeys(keymap);
|
||||||
// return !!(BitTst(keymap, (sizeof(KeyMapByteArray)*8) - iKey));
|
return !!(BitTst(keymap, (sizeof(KeyMap)*8) - key));
|
||||||
//#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
|
Reference in New Issue
Block a user