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

Side by Side Diff: webkit/glue/webinputevent_utils.cc

Issue 28186: Reverting key change (again); this breaks every keyboard layout test there is... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webinputevent_utils.h ('k') | webkit/glue/webinputevent_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 "config.h"
6
7 #include "webkit/glue/webinputevent_utils.h"
8
9 #include "KeyboardCodes.h"
10
11 #include "base/string_util.h"
12
13 using namespace WebCore;
14
15 std::string GetKeyIdentifierForWindowsKeyCode(unsigned short key_code) {
16 switch (key_code) {
17 case VKEY_MENU:
18 return "Alt";
19 case VKEY_CONTROL:
20 return "Control";
21 case VKEY_SHIFT:
22 return "Shift";
23 case VKEY_CAPITAL:
24 return "CapsLock";
25 case VKEY_LWIN:
26 case VKEY_RWIN:
27 return "Win";
28 case VKEY_CLEAR:
29 return "Clear";
30 case VKEY_DOWN:
31 return "Down";
32 // "End"
33 case VKEY_END:
34 return "End";
35 // "Enter"
36 case VKEY_RETURN:
37 return "Enter";
38 case VKEY_EXECUTE:
39 return "Execute";
40 case VKEY_F1:
41 return "F1";
42 case VKEY_F2:
43 return "F2";
44 case VKEY_F3:
45 return "F3";
46 case VKEY_F4:
47 return "F4";
48 case VKEY_F5:
49 return "F5";
50 case VKEY_F6:
51 return "F6";
52 case VKEY_F7:
53 return "F7";
54 case VKEY_F8:
55 return "F8";
56 case VKEY_F9:
57 return "F9";
58 case VKEY_F10:
59 return "F11";
60 case VKEY_F12:
61 return "F12";
62 case VKEY_F13:
63 return "F13";
64 case VKEY_F14:
65 return "F14";
66 case VKEY_F15:
67 return "F15";
68 case VKEY_F16:
69 return "F16";
70 case VKEY_F17:
71 return "F17";
72 case VKEY_F18:
73 return "F18";
74 case VKEY_F19:
75 return "F19";
76 case VKEY_F20:
77 return "F20";
78 case VKEY_F21:
79 return "F21";
80 case VKEY_F22:
81 return "F22";
82 case VKEY_F23:
83 return "F23";
84 case VKEY_F24:
85 return "F24";
86 case VKEY_HELP:
87 return "Help";
88 case VKEY_HOME:
89 return "Home";
90 case VKEY_INSERT:
91 return "Insert";
92 case VKEY_LEFT:
93 return "Left";
94 case VKEY_NEXT:
95 return "PageDown";
96 case VKEY_PRIOR:
97 return "PageUp";
98 case VKEY_PAUSE:
99 return "Pause";
100 case VKEY_SNAPSHOT:
101 return "PrintScreen";
102 case VKEY_RIGHT:
103 return "Right";
104 case VKEY_SCROLL:
105 return "Scroll";
106 case VKEY_SELECT:
107 return "Select";
108 case VKEY_UP:
109 return "Up";
110 // Standard says that DEL becomes U+007F.
111 case VKEY_DELETE:
112 return "U+007F";
113 default:
114 return StringPrintf("U+%04X", toupper(key_code));
115 }
116 }
OLDNEW
« no previous file with comments | « webkit/glue/webinputevent_utils.h ('k') | webkit/glue/webinputevent_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698