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-sequence" attributes="keys hintTexts keyCodes"> | 7 <polymer-element name="kb-key-sequence" attributes="keys hintTexts keyCodes inve rt"> |
8 <template> | 8 <template> |
9 <style> | 9 <style> |
10 @host { | 10 @host { |
11 * { | 11 * { |
12 display: none; | 12 display: none; |
13 } | 13 } |
14 } | 14 } |
15 </style> | 15 </style> |
16 <kb-key-codes id="keyCodeMetadata"></kb-key-codes> | 16 <kb-key-codes id="keyCodeMetadata"></kb-key-codes> |
17 </template> | 17 </template> |
(...skipping 22 matching lines...) Expand all Loading... | |
40 key.innerText = newKeys[i]; | 40 key.innerText = newKeys[i]; |
41 key.accents = newKeys[i]; | 41 key.accents = newKeys[i]; |
42 if (newHintTexts) | 42 if (newHintTexts) |
43 key.hintText = newHintTexts[i]; | 43 key.hintText = newHintTexts[i]; |
44 var state = this.$.keyCodeMetadata.GetKeyCodeAndModifiers( | 44 var state = this.$.keyCodeMetadata.GetKeyCodeAndModifiers( |
45 keyCodes[i]); | 45 keyCodes[i]); |
46 if (state) { | 46 if (state) { |
47 key.keyCode = state.keyCode; | 47 key.keyCode = state.keyCode; |
48 key.shiftModifier = state.shiftModifier; | 48 key.shiftModifier = state.shiftModifier; |
49 } | 49 } |
50 if(this.invert) { | |
bshe
2013/10/08 14:58:06
Is the keycode still right after this key inverted
rsadam
2013/10/08 21:36:14
I think it is. I tested it by inverting the qwerty
rsadam
2013/10/09 15:25:13
Fixed!
| |
51 key.invert = true; | |
52 key.char = newKeys[i]; | |
53 } | |
50 replacement.appendChild(key); | 54 replacement.appendChild(key); |
51 } | 55 } |
52 result = replacement; | 56 result = replacement; |
53 } | 57 } |
54 return result; | 58 return result; |
55 } | 59 } |
56 }); | 60 }); |
57 </script> | 61 </script> |
58 </polymer-element> | 62 </polymer-element> |
OLD | NEW |