Ignore:
Timestamp:
Oct 26, 2001, 12:04:13 PM (24 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibmsgtranslate.cpp

    r7211 r7212  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.69 2001-10-26 09:10:12 phaller Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.70 2001-10-26 10:03:34 phaller Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    3636#include <pmscan.h>
    3737#include <winscan.h>
     38#include <winkeyboard.h>
    3839
    3940#define DBG_LOCALLOG    DBG_oslibmsgtranslate
    4041#include "dbglocal.h"
    4142
     43
     44#if REDUNDANT_AND_BUGGY_DEFINITION
    4245// Formerly used method of translation based on OS/2 VKEY value didn't work
    4346// right. We need to take a look at the scan code we get from PM and derive
     
    8992    0xDE, 0x28,     // 0x28 '
    9093    0xC0, 0x29,     // 0x29 `
    91     0x10, 0x2A,     // 0x2A LShift
     94    VK_LSHIFT_W, 0x2A,     // 0x2A LShift
    9295    0xDC, 0x2B,     // 0x2B Bkslsh
    9396    0x5A, 0x2C,     // 0x2C z
     
    101104    0xBE, 0x34,     // 0x34 .
    102105    0xBF, 0x35,     // 0x35 /
    103     0x10, 0x36,     // 0x36 RShift
     106    VK_RSHIFT_W, 0x36,     // 0x36 RShift
    104107    0x6A, 0x37,     // 0x37 * Pad
    105108//  0x12, 0x38,     // 0x38 LAlt
     
    161164    0x5C, 0x15C     // 0x6F RMenu? (PM scan 0x7F)
    162165};
     166#endif
    163167
    164168static BOOL fGenerateDoubleClick = FALSE;
     
    730734VirtualKeyFound:
    731735//        dprintf (("VIRTUALKEYFOUND:(%x)", virtualKey));
    732 
     736     
     737        // @@@PH: what's this supposed to be?
    733738        // Adjust PM scancodes for Win* keys
    734739        if (scanCode >= 0x70)
    735             scanCode -= 0x10;
    736         winMsg->wParam  = pmscan2winkey[scanCode][0];
     740          scanCode -= 0x10;
     741     
     742      // winMsg->wParam  = pmscan2winkey[scanCode][0];
     743      // wWinScan  = pmscan2winkey[scanCode][1];
     744      {
     745        BOOL  fWinExtended;
     746        BYTE  bWinVKey;
     747        WORD  wWinScan;
     748       
     749        // Note: Numlock-state currently ignored, see below
     750        KeyTranslatePMScanToWinVKey(scanCode,
     751                                    FALSE,
     752                                    &bWinVKey,
     753                                    &wWinScan,
     754                                    &fWinExtended);
     755        winMsg->wParam = bWinVKey;
    737756        winMsg->lParam  = repeatCount & 0x0FFFF;                 // bit 0-15, repeatcount
    738         winMsg->lParam |= (pmscan2winkey[scanCode][1] & 0x1FF) << 16;  // bit 16-23, scancode + bit 15 extended
     757        winMsg->lParam |= (wWinScan & 0x1FF) << 16;  // bit 16-23, scancode + bit 15 extended
     758      }
    739759
    740760        // Adjust VKEY value for pad digits if NumLock is on
Note: See TracChangeset for help on using the changeset viewer.