Ignore:
Timestamp:
Nov 16, 2001, 6:47:05 PM (24 years ago)
Author:
phaller
Message:

ugly AltGr hack

File:
1 edited

Legend:

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

    r7223 r7370  
    1 /* $Id: oslibmsg.cpp,v 1.49 2001-10-26 17:48:21 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.50 2001-11-16 17:47:05 phaller Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    3535#include "oslibwin.h"
    3636#include <win\hook.h>
     37#include <winscan.h>
     38#include <winkeyboard.h>
    3739
    3840#define DBG_LOCALLOG    DBG_oslibmsg
     
    206208//******************************************************************************
    207209//******************************************************************************
     210
     211static void i_MostUglyAltGrHack(LPMSG pMsg)
     212{
     213  switch (pMsg->message)
     214  {
     215    case WINWM_KEYUP:
     216    case WINWM_SYSKEYUP:
     217      USHORT wWinScan = (pMsg->lParam & 0x00ff0000) >> 16;
     218      if (wWinScan == WINSCAN_ALTRIGHT)
     219      {
     220        KeySetOverlayKeyState(VK_RMENU_W, KEYOVERLAYSTATE_DONTCARE);
     221        KeySetOverlayKeyState(VK_MENU_W, KEYOVERLAYSTATE_DONTCARE);
     222      }
     223      break;
     224  }
     225}
     226
     227
    208228BOOL OSLibWinGetMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax,
    209229                    BOOL isUnicode)
     
    262282        }
    263283   
     284        i_MostUglyAltGrHack(pMsg);
     285   
    264286        return (pMsg->message != WINWM_QUIT);
    265287  }
     
    322344  }
    323345 
     346  i_MostUglyAltGrHack(pMsg);
     347 
    324348  return rc;
    325349}
Note: See TracChangeset for help on using the changeset viewer.