r=pedemont, sr=blizzard (platform specific), a=mkaply
OS/2 only - add an extra check for detecting scroll mouse vs. keyboard events


git-svn-id: svn://10.0.0.236/trunk@154535 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com 2004-04-06 16:15:21 +00:00
parent 0c43b91540
commit a5c127e32d

View File

@ -2207,9 +2207,13 @@ PRBool nsWindow::OnKey( MPARAM mp1, MPARAM mp2)
if (usVKey == VK_ALTGRAF || usVKey == VK_ALT) event.isAlt = PR_TRUE;
}
if (((event.keyCode == NS_VK_UP) || (event.keyCode == NS_VK_DOWN)) && (!(fsFlags & KC_KEYUP))) {
/* Checking for a scroll mouse event vs. a keyboard event */
/* The way we know this is that the repeat count is 0 and */
/* the key is not physically down */
if (((event.keyCode == NS_VK_UP) || (event.keyCode == NS_VK_DOWN)) &&
(!(fsFlags & KC_KEYUP)) &&
(CHAR3FROMMP(mp1) == 0)) {
if (!(WinGetPhysKeyState(HWND_DESKTOP, CHAR4FROMMP(mp1)) & 0x8000)) {
/* This isn't a real keyboard event - assume it is a scroll mouse */
MPARAM mp2;
if (event.keyCode == NS_VK_UP)
mp2 = MPFROM2SHORT(0, SB_LINEUP);