backout previous check-in because the tree is closed

This commit is contained in:
masayuki%d-toybox.com 2006-06-05 15:41:05 +00:00
Родитель 705c65bb3d
Коммит e1d97f38fd
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -3233,7 +3233,7 @@ UINT nsWindow::MapFromNativeToDOM(UINT aNativeKeyCode)
{
switch (aNativeKeyCode) {
case VK_OEM_1: return NS_VK_SEMICOLON; // 0xBA, For the US standard keyboard, the ';:' key
case VK_OEM_PLUS: return NS_VK_ADD; // 0xBB, For any country/region, the '+' key
case VK_OEM_PLUS: return NS_VK_EQUALS; // 0xBB, For any country/region, the '+' key
case VK_OEM_MINUS: return NS_VK_SUBTRACT; // 0xBD, For any country/region, the '-' key
}
@ -3341,11 +3341,13 @@ BOOL nsWindow::OnKeyDown(UINT aVirtualKeyCode, UINT aScanCode, LPARAM aKeyData)
BOOL gotMsg = ::PeekMessageW(&msg, mWnd, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD);
// Enter and backspace are always handled here to avoid for example the
// confusion between ctrl-enter and ctrl-J.
// Ctrl+[Add, Subtract] are always handled here to make text zoom shortcuts work
// on different keyboard layouts.
// Ctrl+[Add, Subtract, Equals] are always handled here to make text zoom shortcuts work
// on different keyboard layouts (Equals is needed because many layouts return it when
// pressing Ctrl++ and that's why it's also accepted as a shortcut for increasing zoom).
if (virtualKeyCode == NS_VK_RETURN || virtualKeyCode == NS_VK_BACK ||
(mIsControlDown && !mIsAltDown && !mIsShiftDown &&
(virtualKeyCode == NS_VK_ADD || virtualKeyCode == NS_VK_SUBTRACT)) ||
(virtualKeyCode == NS_VK_ADD || virtualKeyCode == NS_VK_SUBTRACT ||
virtualKeyCode == NS_VK_EQUALS)) ||
((mIsControlDown || mIsAltDown) && KeyboardLayout::IsPrintableCharKey (aVirtualKeyCode)))
{
// Remove a possible WM_CHAR or WM_SYSCHAR messages from the message queue.