Ignore:
Timestamp:
Feb 11, 2002, 3:03:18 PM (24 years ago)
Author:
sandervl
Message:

PF: Numpad enter fix for GetKeyNameTextA

File:
1 edited

Legend:

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

    r7866 r7871  
    1 /* $Id: winkeyboard.cpp,v 1.30 2002-02-11 13:48:43 sandervl Exp $ */
     1/* $Id: winkeyboard.cpp,v 1.31 2002-02-11 14:03:18 sandervl Exp $ */
    22/*
    33 * Win32 <-> PM key translation
     
    346346/* 0x0B                   */ , 0x00                   , NULL
    347347/* 0x0C VK_CLEAR          */ , PMSCAN_PAD5            , "Num 5"
    348 /* 0x0D VK_RETURN         */ , PMSCAN_ENTER           , "Enter" // @@@PH BUG: identical to "Num Enter" !
     348/* 0x0D VK_RETURN         */ , PMSCAN_ENTER           , "Enter"
    349349/* 0x0E                   */ , 0x00                   , NULL
    350350/* 0x0F                   */ , 0x00                   , NULL
     
    591591                             };
    592592
     593// @@PF reflect Num Enter key
     594LPSTR lpstrNumEnter = "Num Enter";
    593595
    594596// @@@PH
     
    13101312 *****************************************************************************/
    13111313
    1312 ODINFUNCTION0(UINT, GetKBCodePage)
     1314UINT WIN32API GetKBCodePage()
    13131315{
    13141316  return (GetOEMCP());
     
    13161318//******************************************************************************
    13171319//******************************************************************************
    1318 ODINFUNCTION3(int,    GetKeyNameTextA,
    1319               LPARAM, lParam,
    1320               LPSTR,  lpString,
    1321               int,    nSize)
     1320int WIN32API GetKeyNameTextA(LPARAM lParam, LPSTR  lpString, int nSize)
    13221321{
    13231322  // check the scancodes if the extended key bit is set so
    13241323  // we can easily distinguish between "left" and "right" special keys, etc.
    13251324  BOOL  fDontCare = (lParam & WIN_KEY_DONTCARE) != 0;
    1326   BOOL  fExtended = (lParam & WIN_KEY_EXTENDED) != 0;
     1325  BOOL  fExtended = (lParam & WIN_KEY_EXTENDED) != 0,PMExtended;
    13271326  UCHAR ucWinScan = (lParam & 0x00ff0000) >> 16;
    13281327  UCHAR ucWinVKey;
     
    13481347           ucPMScan));
    13491348  ucWinVKey = abPMScanToWinVKey[ucPMScan][0];
    1350   dprintf(("ucPMScan=%02xh translated to ucWinVKey=%02xh\n",
     1349  PMExtended = abPMScanToWinVKey[ucPMScan][1];
     1350
     1351  dprintf(("ucPMScan=%02xh translated to ucWinVKey=%02xh PMExtended=%d\n",
    13511352           ucPMScan,
    1352            ucWinVKey));
     1353           ucWinVKey,PMExtended));
    13531354
    13541355  // Bug in Open32:
     
    13601361  memset(lpString, 0, nSize);
    13611362 
    1362   LPSTR lpstrKey = abWinVKeyToPMScan[ucWinVKey].lpstrName;
     1363  LPSTR lpstrKey;
     1364  lpstrKey = abWinVKeyToPMScan[ucWinVKey].lpstrName;
     1365
     1366  // handle Enter on Numeric Keypad here
     1367  if (PMExtended)
     1368  {
     1369   if (ucWinVKey==VK_RETURN) lpstrKey = lpstrNumEnter;
     1370  }
     1371
    13631372  if (NULL == lpstrKey)
    13641373  {
     
    13911400//******************************************************************************
    13921401//******************************************************************************
    1393 ODINFUNCTION3(int,    GetKeyNameTextW,
    1394               LPARAM, lParam,
    1395               LPWSTR, lpString,
    1396               int,    nSize)
     1402int WIN32API GetKeyNameTextW(LPARAM lParam, LPWSTR lpString, int nSize)
    13971403{
    13981404    dprintf(("USER32:  GetKeyNameTextW DOES NOT WORK (not implemented)\n"));
Note: See TracChangeset for help on using the changeset viewer.