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

Side by Side Diff: ui/events/ozone/layout/layout_util.cc

Issue 965473002: Revert of Fix CapsLock remapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « ui/events/ozone/evdev/keyboard_evdev.cc ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ozone/layout/layout_util.h" 5 #include "ui/events/ozone/layout/layout_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 #include "ui/events/keycodes/dom3/dom_code.h" 10 #include "ui/events/keycodes/dom3/dom_code.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 return false; 539 return false;
540 } 540 }
541 } 541 }
542 542
543 int ModifierDomKeyToEventFlag(DomKey key) { 543 int ModifierDomKeyToEventFlag(DomKey key) {
544 switch (key) { 544 switch (key) {
545 case DomKey::ALT: 545 case DomKey::ALT:
546 return EF_ALT_DOWN; 546 return EF_ALT_DOWN;
547 case DomKey::ALT_GRAPH: 547 case DomKey::ALT_GRAPH:
548 return EF_ALTGR_DOWN; 548 return EF_ALTGR_DOWN;
549 // ChromeOS uses F16 to represent CapsLock before the rewriting stage,
550 // based on the historical X11 implementation.
551 // TODO post-X11: Switch to use CapsLock uniformly.
552 case DomKey::F16:
553 case DomKey::CAPS_LOCK: 549 case DomKey::CAPS_LOCK:
554 return EF_CAPS_LOCK_DOWN; 550 return EF_CAPS_LOCK_DOWN;
555 case DomKey::CONTROL: 551 case DomKey::CONTROL:
556 return EF_CONTROL_DOWN; 552 return EF_CONTROL_DOWN;
557 case DomKey::HYPER: 553 case DomKey::HYPER:
558 return EF_MOD3_DOWN; 554 return EF_MOD3_DOWN;
559 case DomKey::META: 555 case DomKey::META:
560 return EF_ALT_DOWN; 556 return EF_ALT_DOWN;
561 case DomKey::OS: 557 case DomKey::OS:
562 return EF_COMMAND_DOWN; 558 return EF_COMMAND_DOWN;
563 case DomKey::SHIFT: 559 case DomKey::SHIFT:
564 return EF_SHIFT_DOWN; 560 return EF_SHIFT_DOWN;
565 case DomKey::SUPER: 561 case DomKey::SUPER:
566 return EF_MOD3_DOWN; 562 return EF_MOD3_DOWN;
567 default: 563 default:
568 return EF_NONE; 564 return EF_NONE;
569 } 565 }
570 // Not represented: 566 // Not represented:
571 // DomKey::ACCEL 567 // DomKey::ACCEL
572 // DomKey::FN 568 // DomKey::FN
573 // DomKey::FN_LOCK 569 // DomKey::FN_LOCK
574 // DomKey::NUM_LOCK 570 // DomKey::NUM_LOCK
575 // DomKey::SCROLL_LOCK 571 // DomKey::SCROLL_LOCK
576 // DomKey::SYMBOL 572 // DomKey::SYMBOL
577 // DomKey::SYMBOL_LOCK 573 // DomKey::SYMBOL_LOCK
578 } 574 }
579 575
580 } // namespace ui 576 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/keyboard_evdev.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698