• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2012 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.
4
5// Protocol for event messages.
6
7syntax = "proto2";
8
9option optimize_for = LITE_RUNTIME;
10
11package remoting.protocol;
12
13// Defines a keyboard event.
14message KeyEvent {
15
16  // The keyboard (Caps/Num) lock states.
17  enum LockStates {
18    LOCK_STATES_CAPSLOCK = 1;
19    LOCK_STATES_NUMLOCK = 2;
20  }
21
22  // The Windows Virtual Key code.
23  //optional int32 keycode = 1;
24  optional bool pressed = 2;
25
26  // The USB key code.
27  // The upper 16-bits are the USB Page (0x07 for key events).
28  // The lower 16-bits are the USB Usage ID (which identifies the actual key).
29  optional uint32 usb_keycode = 3;
30
31  // The keyboard lock states.
32  optional uint32 lock_states = 4 [default = 0];
33}
34
35// Defines a mouse event message on the event channel.
36message MouseEvent {
37
38  enum MouseButton {
39    BUTTON_UNDEFINED = 0;
40    BUTTON_LEFT = 1;
41    BUTTON_MIDDLE = 2;
42    BUTTON_RIGHT = 3;
43    BUTTON_MAX = 4;
44  }
45
46  // Mouse position information.
47  optional int32 x = 1;
48  optional int32 y = 2;
49
50  // Mouse button event.
51  optional MouseButton button = 5;
52  optional bool button_down = 6;
53
54  // Mouse wheel information.
55  // These values encode the number of pixels and 'ticks' of movement that
56  // would result from the wheel event on the client system.
57  optional float wheel_delta_x = 7;
58  optional float wheel_delta_y = 8;
59  optional float wheel_ticks_x = 9;
60  optional float wheel_ticks_y = 10;
61
62  // Mouse movement information. Provided only when mouse lock is engaged.
63  optional int32 delta_x = 11;
64  optional int32 delta_y = 12;
65}
66
67// Defines an event that sends clipboard data between peers.
68message ClipboardEvent {
69
70  // The MIME type of the data being sent.
71  optional string mime_type = 1;
72
73  // The data being sent.
74  optional bytes data = 2;
75}
76