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

Side by Side Diff: ui/base/keycodes/keyboard_code_conversion.cc

Issue 8824007: Revert 113224 - IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in u... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | « ui/aura/event.h ('k') | ui/base/keycodes/keyboard_code_conversion_x.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/keycodes/keyboard_code_conversion.h" 5 #include "ui/base/keycodes/keyboard_code_conversion.h"
6 6
7 #include "ui/base/events.h" 7 #include "ui/base/events.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // ctrl-Enter maps to \x0A (Line feed) 49 // ctrl-Enter maps to \x0A (Line feed)
50 case VKEY_RETURN: 50 case VKEY_RETURN:
51 return 0x0A; 51 return 0x0A;
52 // Returns 0 for all other keys to avoid inputting unexpected chars. 52 // Returns 0 for all other keys to avoid inputting unexpected chars.
53 default: 53 default:
54 return 0; 54 return 0;
55 } 55 }
56 } 56 }
57 } 57 }
58 58
59 // For IME support
60 if (key_code == ui::VKEY_PROCESSKEY)
61 return 0xE5;
62
63 // Normal characters 59 // Normal characters
64 if (key_code >= VKEY_0 && key_code <= VKEY_9) { 60 if (key_code >= VKEY_0 && key_code <= VKEY_9) {
65 return shift ? ")!@#$%^&*("[key_code - VKEY_0] : 61 return shift ? ")!@#$%^&*("[key_code - VKEY_0] :
66 static_cast<uint16>(key_code); 62 static_cast<uint16>(key_code);
67 } else if (key_code >= VKEY_NUMPAD0 && key_code <= VKEY_NUMPAD9) { 63 } else if (key_code >= VKEY_NUMPAD0 && key_code <= VKEY_NUMPAD9) {
68 return key_code - VKEY_NUMPAD0 + '0'; 64 return key_code - VKEY_NUMPAD0 + '0';
69 } 65 }
70 66
71 switch (key_code) { 67 switch (key_code) {
72 case VKEY_TAB: 68 case VKEY_TAB:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 case VKEY_OEM_6: 102 case VKEY_OEM_6:
107 return shift ? '}' : ']'; 103 return shift ? '}' : ']';
108 case VKEY_OEM_7: 104 case VKEY_OEM_7:
109 return shift ? '"' : '\''; 105 return shift ? '"' : '\'';
110 default: 106 default:
111 return 0; 107 return 0;
112 } 108 }
113 } 109 }
114 110
115 } // namespace ui 111 } // namespace ui
OLDNEW
« no previous file with comments | « ui/aura/event.h ('k') | ui/base/keycodes/keyboard_code_conversion_x.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698