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

Side by Side Diff: mojo/services/public/interfaces/input_events/input_events.mojom

Issue 476283006: mojo: Fix double character inserts on Windows by removing a Linux hack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move input method to its own file. Created 6 years, 3 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
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 import "mojo/services/public/interfaces/geometry/geometry.mojom" 5 import "mojo/services/public/interfaces/geometry/geometry.mojom"
6 import "mojo/services/public/interfaces/input_events/input_event_constants.mojom " 6 import "mojo/services/public/interfaces/input_events/input_event_constants.mojom "
7 import "mojo/services/public/interfaces/input_events/input_key_codes.mojom" 7 import "mojo/services/public/interfaces/input_events/input_key_codes.mojom"
8 8
9 module mojo { 9 module mojo {
10 10
11 struct LocationData { 11 struct LocationData {
12 Point in_view_location; 12 Point in_view_location;
13 Point? screen_location; 13 Point? screen_location;
14 }; 14 };
15 15
16 struct KeyData { 16 struct KeyData {
17 // The chromium event key code; these values are from the ui/ KeyCode enum, 17 // The chromium event key code; these values are from the ui/ KeyCode enum,
18 // which has the fun property of being neither consistently the Windows key 18 // which has the fun property of being neither consistently the Windows key
19 // code, nor the X11 keycodes. (This value is consistent across platforms 19 // code, nor the X11 keycodes. (This value is consistent across platforms
20 // for basic ASCII characters; it will differ for modifiers. We don't define 20 // for basic ASCII characters; it will differ for modifiers. We don't define
21 // this as a mojo enum because mojom doesn't appear to have a platform 21 // this as a mojo enum because mojom doesn't appear to have a platform
22 // dependent preprocessor yet.) 22 // dependent preprocessor yet.)
23 // 23 //
24 // TODO(erg): Remove this, and declare Win32 keycodes correct by fiat. We can 24 // TODO(erg): Remove this, and declare Win32 keycodes correct by fiat. We can
25 // not do this until we remove ui::Event usage from within mojo. 25 // not do this until we remove ui::Event usage from within mojo.
26 int32 key_code; 26 int32 key_code;
27 27
28 // Whether this is a character event, and the character value if it is. Note
29 // that this is different than |text|, which holds a value even when there
30 // isn't actually a character to insert. (For example, |text| will be set and
31 // have a value on backspace, and |character| won't.)
28 bool is_char; 32 bool is_char;
33 uint16 character;
29 34
30 // The Win32 key code. Because of the web, this is the closest thing that we 35 // The Win32 key code. Because of the web, this is the closest thing that we
31 // have to a cross platform key state. 36 // have to a cross platform key state.
32 KeyboardCode windows_key_code; 37 KeyboardCode windows_key_code;
33 38
34 // The platform specific key code. 39 // The platform specific key code.
35 // 40 //
36 // TODO(erg): This exists only for NPAPI support, pepper USB keyboard support 41 // TODO(erg): This exists only for NPAPI support, pepper USB keyboard support
37 // and IME on android support. Theoretically, we should be able to remove this 42 // and IME on android support. Theoretically, we should be able to remove this
38 // in the medium to long term. 43 // in the medium to long term.
(...skipping 21 matching lines...) Expand all
60 EventType action; 65 EventType action;
61 EventFlags flags; 66 EventFlags flags;
62 int64 time_stamp; 67 int64 time_stamp;
63 LocationData? location_data; 68 LocationData? location_data;
64 KeyData? key_data; 69 KeyData? key_data;
65 TouchData? touch_data; 70 TouchData? touch_data;
66 MouseWheelData? wheel_data; 71 MouseWheelData? wheel_data;
67 }; 72 };
68 73
69 } 74 }
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/input_events/lib/mojo_extended_key_event_data.cc ('k') | mojo/views/input_method_mojo_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698