OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Braille display access private API. | 5 // Braille display access private API. |
6 namespace brailleDisplayPrivate { | 6 namespace brailleDisplayPrivate { |
7 // Braille display keyboard command. | 7 // Braille display keyboard command. |
8 enum KeyCommand { | 8 enum KeyCommand { |
9 line_up, | 9 line_up, |
10 line_down, | 10 line_down, |
(...skipping 10 matching lines...) Expand all Loading... |
21 // A keyboard event. This is not a standard keyboard event because | 21 // A keyboard event. This is not a standard keyboard event because |
22 // braille display keyboards look significantly different from standard | 22 // braille display keyboards look significantly different from standard |
23 // keyboards. | 23 // keyboards. |
24 dictionary KeyEvent { | 24 dictionary KeyEvent { |
25 KeyCommand command; | 25 KeyCommand command; |
26 // 0-based display position for commands that involve a routing key. | 26 // 0-based display position for commands that involve a routing key. |
27 long? displayPosition; | 27 long? displayPosition; |
28 // Braille dot keys that were pressed, stored in the low-order bits. | 28 // Braille dot keys that were pressed, stored in the low-order bits. |
29 // Dot 1 is stored in bit 0, dot2 in bit 1, etc. | 29 // Dot 1 is stored in bit 0, dot2 in bit 1, etc. |
30 long? brailleDots; | 30 long? brailleDots; |
31 // DOM keyboard event for a key that corresponds to a standard key. | 31 // DOM keyboard event code. This is present when command is standard_key |
32 DOMString? standardKeyName; | 32 // and the braille display event represents a non-alphanumeric key such |
| 33 // as an arrow key or function key. |
| 34 // The value is as defined by the |code| property in |
| 35 // http://www.w3.org/TR/uievents/#keyboard-event-interface |
| 36 DOMString? standardKeyCode; |
| 37 // DOM keyboard event character value. This is present if the |
| 38 // braille key event corresponds to a character. |
| 39 DOMString? standardKeyChar; |
33 // Whether the space key was pressed. | 40 // Whether the space key was pressed. |
34 boolean? spaceKey; | 41 boolean? spaceKey; |
35 // Whether the alt key was pressed. | 42 // Whether the alt key was pressed. |
36 boolean? altKey; | 43 boolean? altKey; |
37 // Whether the shift key was pressed. | 44 // Whether the shift key was pressed. |
38 boolean? shiftKey; | 45 boolean? shiftKey; |
39 // Whether the ctrl key was pressed. | 46 // Whether the ctrl key was pressed. |
40 boolean? ctrlKey; | 47 boolean? ctrlKey; |
41 }; | 48 }; |
42 | 49 |
(...skipping 20 matching lines...) Expand all Loading... |
63 static void writeDots(ArrayBuffer cells); | 70 static void writeDots(ArrayBuffer cells); |
64 }; | 71 }; |
65 | 72 |
66 interface Events { | 73 interface Events { |
67 // Fired when a braille display is connected or disconnected. | 74 // Fired when a braille display is connected or disconnected. |
68 static void onDisplayStateChanged(DisplayState state); | 75 static void onDisplayStateChanged(DisplayState state); |
69 // Fired when an input event is received from the display. | 76 // Fired when an input event is received from the display. |
70 static void onKeyEvent(KeyEvent event); | 77 static void onKeyEvent(KeyEvent event); |
71 }; | 78 }; |
72 }; | 79 }; |
OLD | NEW |