mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
122017 - shouldn't always unset shift when dispatching keypress event. r=ben sr=hewitt
This commit is contained in:
parent
878ddb8375
commit
1922a3d5a1
@ -2721,8 +2721,14 @@ BOOL nsWindow::OnChar( UINT mbcsCharCode, UINT virtualKeyCode, bool isMultiByte
|
||||
{
|
||||
::MultiByteToWideChar(gCurrentKeyboardCP,MB_PRECOMPOSED,charToConvert,length,
|
||||
&uniChar,sizeof(uniChar));
|
||||
|
||||
// space is a special case, since shift+space isn't a
|
||||
// different character, and the app may want to use that
|
||||
// combo for something (e.g. page up)
|
||||
if (virtualKeyCode != 0x20)
|
||||
mIsShiftDown = PR_FALSE;
|
||||
|
||||
virtualKeyCode = 0;
|
||||
mIsShiftDown = PR_FALSE;
|
||||
}
|
||||
}
|
||||
return DispatchKeyEvent(NS_KEY_PRESS, uniChar, virtualKeyCode, 0);
|
||||
@ -3251,6 +3257,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
||||
#endif
|
||||
|
||||
mIsShiftDown = IS_VK_DOWN(NS_VK_SHIFT);
|
||||
|
||||
if(WM_SYSCHAR==msg)
|
||||
{
|
||||
mIsControlDown = IS_VK_DOWN(NS_VK_CONTROL);
|
||||
@ -3337,6 +3344,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
||||
(WM_KEYDOWN==msg)?"WM_KEYDOWN":"WM_SYSKEYDOWN" , wParam, lParam);
|
||||
#endif
|
||||
mIsShiftDown = IS_VK_DOWN(NS_VK_SHIFT);
|
||||
|
||||
if(WM_SYSKEYDOWN==msg)
|
||||
{
|
||||
mIsControlDown = IS_VK_DOWN(NS_VK_CONTROL);
|
||||
|
Loading…
Reference in New Issue
Block a user