summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorcallum_linden <none@none>2015-07-15 02:27:33 +0100
committercallum_linden <none@none>2015-07-15 02:27:33 +0100
commit83a9ae7b3c66e87179362f0da9fa7a378b1527e2 (patch)
tree06f185396e03113d643d2c6d96431d3cf25a5493 /indra/llwindow
parenta5f1226f248c4d32f7ea84967e3e2f3acc0e0698 (diff)
New keyboard code for windows that uses system messages directly and works ok. Points to new LLCEFLib
Diffstat (limited to 'indra/llwindow')
-rwxr-xr-xindra/llwindow/llwindowwin32.cpp13
-rwxr-xr-xindra/llwindow/llwindowwin32.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index cd2be87fad..7503d95263 100755
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -42,6 +42,7 @@
#include "llgl.h"
#include "llstring.h"
#include "lldir.h"
+#include "llsdutil.h"
#include "llglslshader.h"
// System includes
@@ -2068,6 +2069,9 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
window_imp->mKeyCharCode = 0; // don't know until wm_char comes in next
window_imp->mKeyScanCode = ( l_param >> 16 ) & 0xff;
window_imp->mKeyVirtualKey = w_param;
+ window_imp->mRawMsg = u_msg;
+ window_imp->mRawWParam = w_param;
+ window_imp->mRawLParam = l_param;
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYDOWN");
{
@@ -2090,6 +2094,9 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
{
window_imp->mKeyScanCode = ( l_param >> 16 ) & 0xff;
window_imp->mKeyVirtualKey = w_param;
+ window_imp->mRawMsg = u_msg;
+ window_imp->mRawWParam = w_param;
+ window_imp->mRawLParam = l_param;
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYUP");
LL_RECORD_BLOCK_TIME(FTM_KEYHANDLER);
@@ -2177,6 +2184,9 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_CHAR:
window_imp->mKeyCharCode = w_param;
+ window_imp->mRawMsg = u_msg;
+ window_imp->mRawWParam = w_param;
+ window_imp->mRawLParam = l_param;
// Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need
// to figure out how that works. - Doug
@@ -3238,6 +3248,9 @@ LLSD LLWindowWin32::getNativeKeyData()
result["scan_code"] = (S32)mKeyScanCode;
result["virtual_key"] = (S32)mKeyVirtualKey;
+ result["msg"] = ll_sd_from_U32(mRawMsg);
+ result["w_param"] = ll_sd_from_U32(mRawWParam);
+ result["l_param"] = ll_sd_from_U32(mRawLParam);
return result;
}
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 2ca8d48fc7..376bef3e50 100755
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -208,6 +208,9 @@ protected:
U32 mKeyCharCode;
U32 mKeyScanCode;
U32 mKeyVirtualKey;
+ U32 mRawMsg;
+ U32 mRawWParam;
+ U32 mRawLParam;
friend class LLWindowManager;
};