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

Side by Side Diff: ui/events/ozone/evdev/keyboard_evdev.cc

Issue 954943003: [KeyboardEvent] Use DOM |code| rather than Windows-based key code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing VKEY in windows for brightness and power Created 5 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
« no previous file with comments | « ui/events/ozone/BUILD.gn ('k') | ui/events/ozone/events_ozone.gyp » ('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 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/evdev/keyboard_evdev.h" 5 #include "ui/events/ozone/evdev/keyboard_evdev.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/events/event_constants.h" 8 #include "ui/events/event_constants.h"
9 #include "ui/events/event_utils.h" 9 #include "ui/events/event_utils.h"
10 #include "ui/events/keycodes/dom4/keycode_converter.h" 10 #include "ui/events/keycodes/dom4/keycode_converter.h"
11 #include "ui/events/keycodes/keyboard_code_conversion.h"
11 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" 12 #include "ui/events/ozone/evdev/event_modifiers_evdev.h"
12 #include "ui/events/ozone/evdev/keyboard_util_evdev.h" 13 #include "ui/events/ozone/evdev/keyboard_util_evdev.h"
13 #include "ui/events/ozone/layout/keyboard_layout_engine.h" 14 #include "ui/events/ozone/layout/keyboard_layout_engine.h"
14 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" 15 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
15 #include "ui/events/ozone/layout/layout_util.h"
16 16
17 namespace ui { 17 namespace ui {
18 18
19 namespace { 19 namespace {
20 20
21 const int kRepeatDelayMs = 500; 21 const int kRepeatDelayMs = 500;
22 const int kRepeatIntervalMs = 50; 22 const int kRepeatIntervalMs = 50;
23 23
24 int EventFlagToEvdevModifier(int flag) { 24 int EventFlagToEvdevModifier(int flag) {
25 switch (flag) { 25 switch (flag) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 UpdateModifier(ModifierDomKeyToEventFlag(dom_key), down); 189 UpdateModifier(ModifierDomKeyToEventFlag(dom_key), down);
190 190
191 KeyEvent event(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, key_code, dom_code, 191 KeyEvent event(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, key_code, dom_code,
192 modifiers_->GetModifierFlags(), dom_key, character, timestamp); 192 modifiers_->GetModifierFlags(), dom_key, character, timestamp);
193 if (platform_keycode) 193 if (platform_keycode)
194 event.set_platform_keycode(platform_keycode); 194 event.set_platform_keycode(platform_keycode);
195 callback_.Run(&event); 195 callback_.Run(&event);
196 } 196 }
197 197
198 } // namespace ui 198 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/BUILD.gn ('k') | ui/events/ozone/events_ozone.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698