// pass key
prog->globals[OFS_PARM0] = (float) key;
prog->globals[OFS_PARM1] = (float) ascii;
- PRVM_ExecuteProgram(m_keydown, M_F_KEYDOWN"(float key) required\n");
+ PRVM_ExecuteProgram(m_keydown, M_F_KEYDOWN"(float key, float ascii) required\n");
PRVM_End;
}
+
void MP_Draw (void)
{
PRVM_Begin;
{
LONG lRet = 1;
int fActive, fMinimized, temp;
+ char state[256];
+ short ascchar;
+ int vkey;
+ qboolean down = false;
+
extern unsigned int uiWheelMessage;
if ( uMsg == uiWheelMessage )
window_y = (int) HIWORD(lParam);
VID_UpdateWindowStatus ();
break;
-
+
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
- Key_Event (MapKey(lParam, wParam), true);
- break;
-
+ down = true;
case WM_KEYUP:
case WM_SYSKEYUP:
- Key_Event (MapKey(lParam, wParam), false);
+ vkey = MapKey(lParam, wParam);
+ GetKeyboardState (state);
+ ToAscii (wParam, vkey, state, &ascchar, 0);
+ Key_Event (vkey, ascchar & 0xFF, down);
break;
case WM_SYSCHAR: