From 8b0ae67e73a82940d3e7004eb17081a8ca4b8594 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 5 Feb 2010 18:23:16 -0800 Subject: Changed LLWindowWin32::getNativeKeyData() to use platform-specific names in the key data. Changed MediaPluginWebkit::deserializeKeyboardData() to use platform-specific names when extracting the key data. Also fixed a mac-specific issue where the arguments were reversed, which was causing flash apps to get bad keycode data. Just pass 0 for the "native modifiers" param on windows, since it doesn't seem to actually have a native notion of a "modifier keys mask". The Qt (non-native) modifiers should be good enough. --- indra/llwindow/llwindowwin32.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 1b9331e784..4c63938415 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -3053,20 +3053,8 @@ LLSD LLWindowWin32::getNativeKeyData() { LLSD result = LLSD::emptyMap(); - // would like to use LLQtWebKit::KM_MODIFIER_SHIFT but don't want - // make the client depend on llQtWebKit so pass over as an int - // (not bool so we can to modifier list later) - S32 modifiers = 0; - if ( GetKeyState( VK_SHIFT ) ) - { - modifiers = 1; - }; - - // these LLSD names are a little confusing here but they - // make more sense on the Mac specific version and that was done first - result["key_code"] = (S32)mKeyScanCode; - result["char_code"] = (S32)mKeyVirtualKey; - result["modifiers"] = modifiers; + result["scan_code"] = (S32)mKeyScanCode; + result["virtual_key"] = (S32)mKeyVirtualKey; return result; } -- cgit v1.2.3