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

Side by Side Diff: ui/keyboard/resources/elements/kb-key.html

Issue 20145004: Switch from text insertion to key press and release events on the virtual k… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/keyboard/resources/api_adapter.js ('k') | ui/keyboard/resources/elements/kb-key-base.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « ui/keyboard/resources/api_adapter.js ('k') | ui/keyboard/resources/elements/kb-key-base.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698