From bf0f6c9420598f375dbab8b8bca488dec230d71f Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 27 Mar 2004 05:33:46 +0000 Subject: [PATCH] get keys support git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/classic/app.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index 613c323b92..0c4f100d2c 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -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 -- 2.45.2