]> git.saurik.com Git - wxWidgets.git/commitdiff
get keys support
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 27 Mar 2004 05:33:46 +0000 (05:33 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 27 Mar 2004 05:33:46 +0000 (05:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/classic/app.cpp

index 613c323b92f3c4d9bf2533d9915348f8f2f6a61a..0c4f100d2cada8f11b27ac905142ade125e4681a 100644 (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