OLD | NEW |
1 <!-- | 1 <!-- |
2 -- Copyright 2013 The Chromium Authors. All rights reserved. | 2 -- Copyright 2013 The Chromium Authors. All rights reserved. |
3 -- Use of this source code is governed by a BSD-style license that can be | 3 -- Use of this source code is governed by a BSD-style license that can be |
4 -- found in the LICENSE file. | 4 -- found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <polymer-element name="kb-key" extends="kb-key-base" | 7 <polymer-element name="kb-key" extends="kb-key-base" |
8 attributes="keyCode shiftModifier weight"> | 8 attributes="keyCode shiftModifier weight"> |
9 <template> | 9 <template> |
10 <style> | 10 <style> |
(...skipping 21 matching lines...) Expand all Loading... |
32 /** | 32 /** |
33 * Whether the shift key is pressed when producing the key value. | 33 * Whether the shift key is pressed when producing the key value. |
34 * @type {boolean} | 34 * @type {boolean} |
35 */ | 35 */ |
36 shiftModifier: false, | 36 shiftModifier: false, |
37 /** | 37 /** |
38 * Weighting to use for layout in order to properly size the key. | 38 * Weighting to use for layout in order to properly size the key. |
39 * Keys with a high weighting are wider than normal keys. | 39 * Keys with a high weighting are wider than normal keys. |
40 * @type {number} | 40 * @type {number} |
41 */ | 41 */ |
42 weight: 1 | 42 weight: 1, |
| 43 |
| 44 /** |
| 45 * Returns a subset of the key attributes. |
| 46 * @return {Object} Mapping of attributes for the key element. |
| 47 */ |
| 48 PopulateDetails: function() { |
| 49 var details = this.super(); |
| 50 details.keyCode = this.keyCode; |
| 51 details.shiftModifier = this.shiftModifier; |
| 52 return details; |
| 53 }, |
43 }); | 54 }); |
44 </script> | 55 </script> |
45 </polymer-element> | 56 </polymer-element> |
46 | 57 |
47 <!-- Special keys --> | 58 <!-- Special keys --> |
48 | 59 |
49 <polymer-element name="kb-shift-key" attributes="unlockedCase lockedCase" | 60 <polymer-element name="kb-shift-key" attributes="unlockedCase lockedCase" |
50 class="shift dark" char="Shift" extends="kb-key"> | 61 class="shift dark" char="Shift" extends="kb-key"> |
51 <script> | 62 <script> |
52 Polymer('kb-shift-key', { | 63 Polymer('kb-shift-key', { |
(...skipping 25 matching lines...) Expand all Loading... |
78 -- code for keyboard layout in place of image. | 89 -- code for keyboard layout in place of image. |
79 --> | 90 --> |
80 <polymer-element name="kb-layout-selector" class="layout-selector dark" char="In
valid" | 91 <polymer-element name="kb-layout-selector" class="layout-selector dark" char="In
valid" |
81 extends="kb-key"> | 92 extends="kb-key"> |
82 <script> | 93 <script> |
83 Polymer('kb-layout-selector', { | 94 Polymer('kb-layout-selector', { |
84 toLayout: 'qwerty' | 95 toLayout: 'qwerty' |
85 }); | 96 }); |
86 </script> | 97 </script> |
87 </polymer-element> | 98 </polymer-element> |
OLD | NEW |