Commit 7ba35d96 authored by cutealien's avatar cutealien

Make key-release events also show the correct Char value on Windows (thx...

Make key-release events also show the correct Char value on Windows (thx @zerochen for report+fix here: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=49499)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4670 dfc29bdd-3216-0410-991c-e03cc46cb475
parent e4ea165d
...@@ -797,7 +797,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -797,7 +797,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
// Handle unicode and deadkeys in a way that works since Windows 95 and nt4.0 // Handle unicode and deadkeys in a way that works since Windows 95 and nt4.0
// Using ToUnicode instead would be shorter, but would to my knowledge not run on 95 and 98. // Using ToUnicode instead would be shorter, but would to my knowledge not run on 95 and 98.
WORD keyChars[2]; WORD keyChars[2];
UINT scanCode = HIWORD(lParam); UINT scanCode = HIWORD(lParam) & 0x7FFF;
int conversionResult = ToAsciiEx(wParam,scanCode,allKeys,keyChars,0,KEYBOARD_INPUT_HKL); int conversionResult = ToAsciiEx(wParam,scanCode,allKeys,keyChars,0,KEYBOARD_INPUT_HKL);
if (conversionResult == 1) if (conversionResult == 1)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment