Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: content/browser/renderer_host/input/web_input_event_util_posix.cc

Issue 1308063007: Generate non-located windowsKeyCode for the WebInputEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/renderer_host/input/web_input_event_util_posix.h"
6
7 namespace content {
8
9 blink::WebInputEvent::Modifiers GetLocationModifiersFromWindowsKeyCode(
10 ui::KeyboardCode key_code) {
11 switch (key_code) {
12 case ui::VKEY_LCONTROL:
13 case ui::VKEY_LSHIFT:
14 case ui::VKEY_LMENU:
15 case ui::VKEY_LWIN:
16 return blink::WebKeyboardEvent::IsLeft;
17 case ui::VKEY_RCONTROL:
18 case ui::VKEY_RSHIFT:
19 case ui::VKEY_RMENU:
20 case ui::VKEY_RWIN:
21 return blink::WebKeyboardEvent::IsRight;
22 default:
23 return static_cast<blink::WebInputEvent::Modifiers>(0);
24 }
25 }
26
27 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698