Ignore:
Timestamp:
Feb 8, 2002, 10:58:42 AM (24 years ago)
Author:
sandervl
Message:

PF: fix for Shift-Enter + Alt-Enter

File:
1 edited

Legend:

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

    r7620 r7837  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.79 2001-12-12 16:40:43 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.80 2002-02-08 09:58:42 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    5353    // there's still an already translated message to be processed
    5454    return FALSE;
    55  
    5655  teb->o.odin.fTranslated = TRUE;
    5756  memcpy(&teb->o.odin.msgWCHAR, pExtraMsg, sizeof(MSG));
     
    656655            {
    657656              winMsg->message = WINWM_SYSKEYUP;
    658              
    659657              // held ALT-key when current key is released
    660658              // generates additional flag 0x2000000
     
    667665              winMsg->message = WINWM_KEYUP;
    668666            }
    669            
    670667            winMsg->lParam |= WIN_KEY_PREVSTATE;                    // bit 30, previous state, always 1 for a WM_KEYUP message
    671668            winMsg->lParam |= 1 << 31;                              // bit 31, transition state, always 1 for WM_KEYUP
     669
     670            //Shift-Enter and possibly others need to have special handling
     671             if (flags & KC_SHIFT)
     672             {
     673                if(fMsgRemoved && !(teb->o.odin.fTranslated))
     674                {                   
     675                  dprintf(("PM: KC_SHIFT: %x",winMsg->wParam));
     676                  if (winMsg->wParam == VK_RETURN_W)
     677                  {
     678                    MSG extramsg;
     679                    memcpy(&extramsg, winMsg, sizeof(MSG));
     680   
     681                    extramsg.message = WINWM_CHAR;
     682                    extramsg.lParam |= 1 << 31;                              // bit 31, transition state, always 1 for WM_KEYUP
     683
     684                    // insert message into the queue
     685                    setThreadQueueExtraCharMessage(teb, &extramsg);
     686
     687                    winMsg->message = WINWM_KEYDOWN;
     688                    winMsg->lParam &= 0x3FFFFFFF;
     689                  }
     690               } // else ???
     691            } // KC_SHIFT
    672692          }
    673693          else
     
    686706          if (flags & KC_KEYUP)
    687707          {
    688             // send WM_SYSKEYUP message
    689             winMsg->message = WINWM_SYSKEYUP;
    690             winMsg->lParam |= WIN_KEY_PREVSTATE;                    // bit 30, previous state, always 1 for a WM_KEYUP message
    691             winMsg->lParam |= 1 << 31;                              // bit 31, transition state, always 1 for WM_KEYUP
     708            // as in NT4 we will send currently fake WM_SYSKEYDOWN with
     709            // ALT key held
     710            // ?? fMsgRemoved care - it seems we can only push one message?             
     711            if(fMsgRemoved && !(teb->o.odin.fTranslated))
     712            {                   
     713
     714              MSG extramsg;
     715              memcpy(&extramsg, winMsg, sizeof(MSG));
     716   
     717              extramsg.message = WINWM_SYSKEYUP;
     718              extramsg.lParam |= WIN_KEY_PREVSTATE;           
     719              extramsg.lParam |= WIN_KEY_ALTHELD;           
     720              extramsg.lParam |= 1 << 31;                              // bit 31, transition state, always 1 for WM_KEYUP
     721
     722              // insert message into the queue
     723              setThreadQueueExtraCharMessage(teb, &extramsg);
     724              winMsg->message = WINWM_SYSKEYDOWN;
     725              winMsg->lParam |= WIN_KEY_ALTHELD;;
     726            }   
    692727          }
    693728          else
Note: See TracChangeset for help on using the changeset viewer.