Index: trunk/src/user32/oslibmsgtranslate.cpp
===================================================================
--- trunk/src/user32/oslibmsgtranslate.cpp	(revision 7212)
+++ trunk/src/user32/oslibmsgtranslate.cpp	(revision 7213)
@@ -1,3 +1,3 @@
-/* $Id: oslibmsgtranslate.cpp,v 1.70 2001-10-26 10:03:34 phaller Exp $ */
+/* $Id: oslibmsgtranslate.cpp,v 1.71 2001-10-26 10:11:50 phaller Exp $ */
 /*
  * Window message translation functions for OS/2
@@ -42,128 +42,4 @@
 
 
-#if REDUNDANT_AND_BUGGY_DEFINITION
-// Formerly used method of translation based on OS/2 VKEY value didn't work
-// right. We need to take a look at the scan code we get from PM and derive
-// the Win32 VKEY and scancode from that because sometimes even the scancode
-// used in Win32 is different from the PM scancode!
-// The format is:
-// Win VKEY, Win scancode, (PM scancode) (key description)
-USHORT pmscan2winkey [][2] = {
-    0, 0,           // 0x00
-    0x1B, 0x01,     // 0x01 Esc
-    0x31, 0x02,     // 0x02 1
-    0x32, 0x03,     // 0x03 2
-    0x33, 0x04,     // 0x04 3
-    0x34, 0x05,     // 0x05 4
-    0x35, 0x06,     // 0x06 5
-    0x36, 0x07,     // 0x07 6
-    0x37, 0x08,     // 0x08 7
-    0x38, 0x09,     // 0x09 8
-    0x39, 0x0A,     // 0x0A 9
-    0x30, 0x0B,     // 0x0B 0
-    0xBD, 0x0C,     // 0x0C -
-    0xBB, 0x0D,     // 0x0D =
-    0x08, 0x0E,     // 0x0E Bksp
-    0x09, 0x0F,     // 0x0F Tab
-    0x51, 0x10,     // 0x10 q
-    0x57, 0x11,     // 0x11 w
-    0x45, 0x12,     // 0x12 e
-    0x52, 0x13,     // 0x13 r
-    0x54, 0x14,     // 0x14 t
-    0x59, 0x15,     // 0x15 y
-    0x55, 0x16,     // 0x16 u
-    0x49, 0x17,     // 0x17 i
-    0x4F, 0x18,     // 0x18 o
-    0x50, 0x19,     // 0x19 p
-    0xDB, 0x1A,     // 0x1A [
-    0xDD, 0x1B,     // 0x1B ]
-    0x0D, 0x1C,     // 0x1C Enter
-    0x11, 0x1D,     // 0x1D LCtrl
-    0x41, 0x1E,     // 0x1E a
-    0x53, 0x1F,     // 0x1F s
-    0x44, 0x20,     // 0x20 d
-    0x46, 0x21,     // 0x21 f
-    0x47, 0x22,     // 0x22 g
-    0x48, 0x23,     // 0x23 h
-    0x4A, 0x24,     // 0x24 j
-    0x4B, 0x25,     // 0x25 k
-    0x4C, 0x26,     // 0x26 l
-    0xBA, 0x27,     // 0x27 ;
-    0xDE, 0x28,     // 0x28 '
-    0xC0, 0x29,     // 0x29 `
-    VK_LSHIFT_W, 0x2A,     // 0x2A LShift
-    0xDC, 0x2B,     // 0x2B Bkslsh
-    0x5A, 0x2C,     // 0x2C z
-    0x58, 0x2D,     // 0x2D x
-    0x43, 0x2E,     // 0x2E c
-    0x56, 0x2F,     // 0x2F v
-    0x42, 0x30,     // 0x30 b
-    0x4E, 0x31,     // 0x31 n
-    0x4D, 0x32,     // 0x32 m
-    0xBC, 0x33,     // 0x33 ,
-    0xBE, 0x34,     // 0x34 .
-    0xBF, 0x35,     // 0x35 /
-    VK_RSHIFT_W, 0x36,     // 0x36 RShift
-    0x6A, 0x37,     // 0x37 * Pad
-//  0x12, 0x38,     // 0x38 LAlt
-    VK_LMENU_W, 0x38,     // 0x38 LAlt
-    0x20, 0x39,     // 0x39 Space
-    0x14, 0x3A,     // 0x3A CapsLk
-    0x70, 0x3B,     // 0x3B F1
-    0x71, 0x3C,     // 0x3C F2
-    0x72, 0x3D,     // 0x3D F3
-    0x73, 0x3E,     // 0x3E F4
-    0x74, 0x3F,     // 0x3F F5
-    0x75, 0x40,     // 0x40 F6
-    0x76, 0x41,     // 0x41 F7
-    0x77, 0x42,     // 0x42 F8
-    0x78, 0x43,     // 0x43 F9
-    0x79, 0x44,     // 0x44 F10 (?)
-    0x90, 0x145,    // 0x45 NumLk
-    0x91, 0x46,     // 0x46 ScrLk
-    0x24, 0x47,     // 0x47 7 Pad
-    0x26, 0x48,     // 0x48 8 Pad
-    0x21, 0x49,     // 0x49 9 Pad
-    0x6D, 0x4A,     // 0x4A - Pad
-    VK_LEFT_W, 0x4B,  // 0x4B Left Arrow (depends on NumLock State)
-    0x0C, 0x4C,     // 0x4C 5 Pad
-    0x27, 0x4D,     // 0x4D 6 Pad
-    0x6B, 0x4E,     // 0x4E + Pad
-    0x23, 0x4F,     // 0x4F 1 Pad
-    0x28, 0x50,     // 0x50 2 Pad
-    0x22, 0x51,     // 0x51 3 Pad
-    0x2D, 0x52,     // 0x52 0 Pad
-    0x2E, 0x53,     // 0x53 . Pad
-    0, 0,           // 0x54
-    0, 0,           // 0x55
-    0xe2, 0x56,     // 0x56 "<>|"
-    0x7A, 0x57,     // 0x57 F11
-    0x7B, 0x58,     // 0x58 F12
-    0, 0,           // 0x59
-    0x0D, 0x11C,    // 0x5A Enter Pad
-    0x11, 0x11D,    // 0x5B RCtrl
-    0x6F, 0x135,    // 0x5C / Pad
-    VK_SNAPSHOT_W, 0x137,    // 0x5D PrtSc
-    0x12, 0x5E,     // 0x5E RAlt
-    0x13, 0x45,     // 0x5F Pause
-    VK_HOME_W,   0x60,           // 0x60
-    VK_UP_W,     0x61,           // 0x61
-    VK_PRIOR_W,  0x62,           // 0x62
-    VK_LEFT_W,   0x63,           // 0x63
-    VK_RIGHT_W,  0x64,           // 0x64
-    VK_END_W,    0x65,           // 0x65
-    VK_DOWN_W,   0x66,           // 0x66
-    VK_NEXT_W,   0x67,           // 0x67
-    VK_INSERT_W, 0x68,           // 0x68
-    VK_DELETE_W, 0x69,           // 0x69
-    VK_F23_W,    0x6A,           // 0x6A
-    VK_F24_W,    0x6B,           // 0x6B
-    0x5D, 0x15D,    // 0x6C RWin (PM scan 0x7C)
-    0, 0,           // 0x6D
-    0x5B, 0x15B,    // 0x6E LWin (PM scan 0x7E)
-    0x5C, 0x15C     // 0x6F RMenu? (PM scan 0x7F)
-};
-#endif
-
 static BOOL fGenerateDoubleClick = FALSE;
 static MSG  doubleClickMsg = {0};
@@ -756,4 +632,8 @@
         winMsg->lParam  = repeatCount & 0x0FFFF;                 // bit 0-15, repeatcount
         winMsg->lParam |= (wWinScan & 0x1FF) << 16;  // bit 16-23, scancode + bit 15 extended
+      
+        // Set the extended bit when appropriate
+        if (fWinExtended)
+            winMsg->lParam = winMsg->lParam | (1<<24);
       }
 
@@ -763,7 +643,4 @@
             winMsg->wParam = virtualKey + 0x30;
 
-        // Set the extended bit when appropriate
-        if (isExtended)
-            winMsg->lParam = winMsg->lParam | (1<<24);
 
         if (!(flags & KC_ALT))
