r=mkaply, a=blizzard
Handle Shift+Enter properly
This commit is contained in:
mkaply%us.ibm.com 2001-02-14 23:02:36 +00:00
Родитель 8733c87caa
Коммит 5d472a3480
1 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -1904,6 +1904,30 @@ PRBool nsWindow::ProcessMessage( ULONG msg, MPARAM mp1, MPARAM mp2, MRESULT &rc)
result = OnPaint();
break;
case WM_TRANSLATEACCEL:
{
PQMSG pQmsg = (PQMSG)mp1;
if (pQmsg->msg == WM_CHAR)
{
LONG mp1 = (LONG)pQmsg->mp1;
LONG mp2 = (LONG)pQmsg->mp2;
// If we have a shift+enter combination, return false
// immediately. OS/2 considers the shift+enter
// combination an accelerator and will translate it into
// a WM_OPEN message. When this happens we do not get a
// WM_CHAR for the down transition of the enter key when
// shift is also pressed and OnKeyDown will not be called.
if ( (SHORT1FROMMP(mp1) & (KC_VIRTUALKEY | KC_SHIFT)) &&
(SHORT2FROMMP(mp2) == VK_ENTER)
)
{
return(PR_TRUE);
}
}
}
break;
case WM_CHAR:
result = OnKey( mp1, mp2);
break;