summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-18 15:57:13 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-01-18 16:49:32 +0000
commitcd1697f022063dafc59fb512b4a469fbe38729cc (patch)
tree7ccc31695aae5bbe56f1e33565154ee4fd77051d
parent9e44ef9432d44cbd326557124036976b056d7868 (diff)
parentc506d1d867f827dbff405d8e789ab4810410079a (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6
-rw-r--r--src/core/web_event_factory.cpp37
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp56
2 files changed, 63 insertions, 30 deletions
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 1a58ae385..2e6fde214 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -109,6 +109,8 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_DECIMAL; // (6E) Decimal key
case Qt::Key_Slash:
return VK_DIVIDE; // (6F) Divide key
+ case Qt::Key_Equal:
+ return VK_OEM_PLUS; // (BB) Equal key
case Qt::Key_PageUp:
return VK_PRIOR; // (21) PAGE UP key
case Qt::Key_PageDown:
@@ -264,9 +266,10 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
case Qt::Key_Help:
return VK_HELP; // (2F) HELP key
case Qt::Key_0:
- case Qt::Key_ParenLeft:
+ case Qt::Key_ParenRight:
return VK_0; // (30) 0) key
case Qt::Key_1:
+ case Qt::Key_Exclam:
return VK_1; // (31) 1 ! key
case Qt::Key_2:
case Qt::Key_At:
@@ -290,7 +293,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
case Qt::Key_Asterisk:
return VK_8; // (38) 8 key '*'
case Qt::Key_9:
- case Qt::Key_ParenRight:
+ case Qt::Key_ParenLeft:
return VK_9; // (39) 9 key '('
case Qt::Key_A:
return VK_A; // (41) A key case 'a': case 'A': return 0x41;
@@ -375,13 +378,22 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
// VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
// VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
// VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
- // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
- // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
- // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
- // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
- // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
- // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
- // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
+
+ case Qt::Key_VolumeMute:
+ return VK_VOLUME_MUTE; // (AD) Windows 2000/XP: Volume Mute key
+ case Qt::Key_VolumeDown:
+ return VK_VOLUME_DOWN; // (AE) Windows 2000/XP: Volume Down key
+ case Qt::Key_VolumeUp:
+ return VK_VOLUME_UP; // (AF) Windows 2000/XP: Volume Up key
+ case Qt::Key_MediaNext:
+ return VK_MEDIA_NEXT_TRACK; // (B0) Windows 2000/XP: Next Track key
+ case Qt::Key_MediaPrevious:
+ return VK_MEDIA_PREV_TRACK; // (B1) Windows 2000/XP: Previous Track key
+ case Qt::Key_MediaStop:
+ return VK_MEDIA_STOP; // (B2) Windows 2000/XP: Stop Media key
+ case Qt::Key_MediaTogglePlayPause:
+ return VK_MEDIA_PLAY_PAUSE; // (B3) Windows 2000/XP: Play/Pause Media key
+
// VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
// VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
// VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
@@ -428,10 +440,17 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
case Qt::Key_BraceRight:
return VK_OEM_6; // case ']': case '}': return 0xDD;
// VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
+ case Qt::Key_Apostrophe:
case Qt::Key_QuoteDbl:
return VK_OEM_7; // case '\'': case '"': return 0xDE;
// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
// VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
+
+ case Qt::Key_AudioRewind:
+ return 0xE3; // (E3) Android/GoogleTV: Rewind media key (Windows: VK_ICO_HELP Help key on 1984 Olivetti M24 deluxe keyboard)
+ case Qt::Key_AudioForward:
+ return 0xE4; // (E4) Android/GoogleTV: Fast forward media key (Windows: VK_ICO_00 '00' key on 1984 Olivetti M24 deluxe keyboard)
+
// VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
// VK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
// VK_ATTN (F6) Attn key
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index f8f96af6a..c2314a1ef 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -1,24 +1,38 @@
-/*
- Copyright (C) 2015 The Qt Company Ltd.
- Copyright (C) 2008, 2009, 2012 Nokia Corporation and/or its subsidiary(-ies)
- Copyright (C) 2007 Staikos Computing Services Inc.
- Copyright (C) 2007 Apple Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWebEngine module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#include "qwebenginepage.h"
#include "qwebenginepage_p.h"