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

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

Issue 808793005: Add numpad keys to ui::LocatedToNonLocatedKeyboardCode() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@x444048-1-located
Patch Set: rebase Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | 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/events/keycodes/keyboard_code_conversion.h" 5 #include "ui/events/keycodes/keyboard_code_conversion.h"
6 6
7 #include "ui/events/event_constants.h" 7 #include "ui/events/event_constants.h"
8 #include "ui/events/keycodes/dom3/dom_code.h" 8 #include "ui/events/keycodes/dom3/dom_code.h"
9 #include "ui/events/keycodes/dom3/dom_key.h" 9 #include "ui/events/keycodes/dom3/dom_key.h"
10 10
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 return VKEY_LWIN; 274 return VKEY_LWIN;
275 case VKEY_LSHIFT: 275 case VKEY_LSHIFT:
276 case VKEY_RSHIFT: 276 case VKEY_RSHIFT:
277 return VKEY_SHIFT; 277 return VKEY_SHIFT;
278 case VKEY_LCONTROL: 278 case VKEY_LCONTROL:
279 case VKEY_RCONTROL: 279 case VKEY_RCONTROL:
280 return VKEY_CONTROL; 280 return VKEY_CONTROL;
281 case VKEY_LMENU: 281 case VKEY_LMENU:
282 case VKEY_RMENU: 282 case VKEY_RMENU:
283 return VKEY_MENU; 283 return VKEY_MENU;
284 case VKEY_NUMPAD0:
285 return VKEY_0;
286 case VKEY_NUMPAD1:
287 return VKEY_1;
288 case VKEY_NUMPAD2:
289 return VKEY_2;
290 case VKEY_NUMPAD3:
291 return VKEY_3;
292 case VKEY_NUMPAD4:
293 return VKEY_4;
294 case VKEY_NUMPAD5:
295 return VKEY_5;
296 case VKEY_NUMPAD6:
297 return VKEY_6;
298 case VKEY_NUMPAD7:
299 return VKEY_7;
300 case VKEY_NUMPAD8:
301 return VKEY_8;
302 case VKEY_NUMPAD9:
303 return VKEY_9;
284 default: 304 default:
285 return key_code; 305 return key_code;
286 } 306 }
287 } 307 }
288 308
289 // Determine the located VKEY corresponding to a non-located VKEY. 309 // Determine the located VKEY corresponding to a non-located VKEY.
290 KeyboardCode NonLocatedToLocatedKeyboardCode(KeyboardCode key_code, 310 KeyboardCode NonLocatedToLocatedKeyboardCode(KeyboardCode key_code,
291 DomCode dom_code) { 311 DomCode dom_code) {
292 switch (key_code) { 312 switch (key_code) {
293 case VKEY_SHIFT: 313 case VKEY_SHIFT:
(...skipping 23 matching lines...) Expand all
317 case VKEY_8: 337 case VKEY_8:
318 return (dom_code == DomCode::NUMPAD8) ? VKEY_NUMPAD8 : VKEY_8; 338 return (dom_code == DomCode::NUMPAD8) ? VKEY_NUMPAD8 : VKEY_8;
319 case VKEY_9: 339 case VKEY_9:
320 return (dom_code == DomCode::NUMPAD9) ? VKEY_NUMPAD9 : VKEY_9; 340 return (dom_code == DomCode::NUMPAD9) ? VKEY_NUMPAD9 : VKEY_9;
321 default: 341 default:
322 return key_code; 342 return key_code;
323 } 343 }
324 } 344 }
325 345
326 } // namespace ui 346 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698