Changeset 8474 for trunk/src


Ignore:
Timestamp:
May 23, 2002, 9:13:00 AM (23 years ago)
Author:
sandervl
Message:

PF: Keyboard fixes for right alt & right shift

Location:
trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/HOOK.CPP

    r8202 r8474  
    1 /* $Id: HOOK.CPP,v 1.37 2002-04-07 14:36:59 sandervl Exp $ */
     1/* $Id: HOOK.CPP,v 1.38 2002-05-23 07:13:00 sandervl Exp $ */
    22
    33/*
     
    835835  // Note: ALT seems to stick sometimes
    836836  // Note: ALTGR can't be queried
    837   BOOL fAltDown = GetAsyncKeyState(VK_LMENU);
     837  BOOL fAltDown = GetAsyncKeyState(VK_LMENU) | GetAsyncKeyState(VK_RMENU);
    838838 
    839839  // this bit indicates if ALT was held
  • trunk/src/user32/oslibmsgtranslate.cpp

    r8380 r8474  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.86 2002-05-07 16:15:30 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.87 2002-05-23 07:13:00 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    628628            winMsg->lParam = winMsg->lParam | WIN_KEY_EXTENDED;
    629629
     630        //@PF PM does not add KC_ALT to right alt but win32 does it
     631        if (WinGetKeyState(HWND_DESKTOP, VK_ALTGRAF) & 0x8000) flags |= KC_ALT;
    630632#if 0
    631633//TODO
     
    637639
    638640#ifdef ALTGR_HACK
    639      
     641   
    640642        if (usPMScanCode == PMSCAN_ALTRIGHT)
    641643        {
     
    694696            // check for a lonesome ALT key ...
    695697            if ( (flags & KC_LONEKEY) &&
    696                 (winMsg->wParam == VK_LMENU_W) )
     698                ((winMsg->wParam == VK_LMENU_W) || (winMsg->wParam == VK_RMENU_W)) )
    697699            {
    698700              winMsg->message = WINWM_SYSKEYUP;
     
    762764              winMsg->message = WINWM_SYSKEYUP;
    763765              winMsg->lParam |= WIN_KEY_PREVSTATE;           
    764               winMsg->lParam |= WIN_KEY_ALTHELD;           
     766              // No ALTHELD for Alt itself ;)
     767              winMsg->lParam |= WIN_KEY_ALTHELD;           
    765768              winMsg->lParam |= 1 << 31;                              // bit 31, transition state, always 1 for WM_KEYUP
    766769          }
     
    10171020
    10181021      extramsg.lParam = msg->lParam & 0x00FFFFFF;
    1019       if(fl & KC_ALT)
     1022      if ((fl & KC_ALT) || (msg->lParam & WIN_KEY_ALTHELD))
    10201023        extramsg.lParam |= WIN_KEY_ALTHELD;
    10211024      if(fl & KC_PREVDOWN)
  • trunk/src/user32/winkeyboard.cpp

    r8365 r8474  
    1 /* $Id: winkeyboard.cpp,v 1.33 2002-05-01 08:03:05 sandervl Exp $ */
     1/* $Id: winkeyboard.cpp,v 1.34 2002-05-23 07:13:00 sandervl Exp $ */
    22/*
    33 * Win32 <-> PM key translation
     
    118118/* 0x34 PMSCAN_PERIOD       */ , VK_PERIOD                  ,FALSE
    119119/* 0x35 PMSCAN_SLASH        */ , VK_SLASH                   ,FALSE
    120 /* 0x36 PMSCAN_SHIFTRIGHT   */ , VK_RSHIFT                  ,TRUE
     120/* 0x36 PMSCAN_SHIFTRIGHT   */ , VK_RSHIFT                  ,FALSE
    121121/* 0x37 PMSCAN_PADASTERISK  */ , VK_MULTIPLY                ,FALSE
    122122/* 0x38 PMSCAN_ALTLEFT      */ , VK_LMENU                   ,FALSE
     
    14011401    case KEYOVERLAYSTATE_UP:
    14021402      return 0x0000;
    1403   }   
     1403  }
     1404  if (nVirtKey == VK_MENU)  return O32_GetKeyState(VK_LMENU) | O32_GetKeyState(VK_RMENU);
    14041405  return O32_GetKeyState(nVirtKey);
    14051406}
     
    14231424      return 0x0000;
    14241425  }
     1426  if (nVirtKey == VK_MENU)  return O32_GetKeyState(VK_LMENU) | O32_GetKeyState(VK_RMENU);
    14251427  return O32_GetAsyncKeyState(nVirtKey);
    14261428}
Note: See TracChangeset for help on using the changeset viewer.