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
3 // found in the LICENSE file.
7 import "ui/mojo/events/input_event_constants.mojom";
8 import "ui/mojo/events/input_key_codes.mojom";
9 import "ui/mojo/geometry/geometry.mojom";
12 // The chromium event key code; these values are from the ui/ KeyCode enum,
13 // which has the fun property of being neither consistently the Windows key
14 // code, nor the X11 keycodes. (This value is consistent across platforms
15 // for basic ASCII characters; it will differ for modifiers. We don't define
16 // this as a mojo enum because mojom doesn't appear to have a platform
17 // dependent preprocessor yet.)
19 // TODO(erg): Remove this, and declare Win32 keycodes correct by fiat. We can
20 // not do this until we remove ui::Event usage from within mojo.
23 // Whether this is a character event, and the character value if it is. Note
24 // that this is different than |text|, which holds a value even when there
25 // isn't actually a character to insert. (For example, |text| will be set and
26 // have a value on backspace, and |character| won't.)
30 // The Win32 key code. Because of the web, this is the closest thing that we
31 // have to a cross platform key state.
32 KeyboardCode windows_key_code;
34 // The platform specific key code.
36 // 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
38 // in the medium to long term.
39 int32 native_key_code;
41 // The text generated by this keystroke. Corresponds to
42 // blink::WebKeyboardEvent::text.
45 // Like |text|, but unmodified by concurrently held modifier keys (except
46 // shift). Corresponds to blink::WebKeyboardEvent::unmodifiedText.
47 uint16 unmodified_text;
53 // |x| and |y| are in the coordinate system of the View.
56 // |screen_x| and |screen_y| are in screen coordinates.
63 // Used for devices that support wheels. Ranges from -1 to 1.
64 float horizontal_wheel;
69 // TODO(sky): rename to type.
71 // TODO(sky): parts of this should move to PointerData.
73 // Time the event was delivered. The time is in milliseconds and corresponds
74 // to the uptime of the machine.
77 PointerData? pointer_data;